FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Geometry::VoxelChartMasker< MeshType > Class Template Referenceabstract

Voxel masker implementation for chart classes. More...

#include <voxel_map.hpp>

Inheritance diagram for FEAT::Geometry::VoxelChartMasker< MeshType >:
FEAT::Geometry::VoxelMasker< MeshType::CoordType, MeshType::shape_dim >

Public Types

typedef VoxelMasker< typename MeshType::CoordType, MeshType::shape_dim > BaseClass
 
typedef CoordType_ CoordType
 the coordinate type More...
 
typedef Tiny::Vector< CoordType_, dim_ > PointType
 the point type More...
 

Public Member Functions

 VoxelChartMasker (const Geometry::Atlas::ChartBase< MeshType > &chart, bool invert)
 Constructor. More...
 
virtual void mask_line (std::vector< int > &mask, const CoordType x_min, const CoordType x_max, const PointType &point) override
 
virtual void mask_line (std::vector< int > &mask, const CoordType x_min, const CoordType x_max, const PointType &point)=0
 Computes the mask for an entire X-coordinate row. More...
 

Static Public Member Functions

static CoordType x_coord (const CoordType x_min, const CoordType x_max, const std::size_t i, const std::size_t n)
 Computes the X-coordinate for a given point. More...
 

Private Attributes

const Geometry::Atlas::ChartBase< MeshType > & _chart
 
const bool _invert
 

Detailed Description

template<typename MeshType>
class FEAT::Geometry::VoxelChartMasker< MeshType >

Voxel masker implementation for chart classes.

This class implements the voxel masker interface by using the signed distance functionality of the Atlas Chart implementations

Author
Peter Zajac

Definition at line 194 of file voxel_map.hpp.

Member Typedef Documentation

◆ BaseClass

template<typename MeshType >
typedef VoxelMasker<typename MeshType::CoordType, MeshType::shape_dim> FEAT::Geometry::VoxelChartMasker< MeshType >::BaseClass

Definition at line 198 of file voxel_map.hpp.

◆ CoordType

template<typename MeshType >
typedef CoordType_ FEAT::Geometry::VoxelMasker< CoordType_, dim_ >::CoordType

the coordinate type

Definition at line 74 of file voxel_map.hpp.

◆ PointType

template<typename MeshType >
typedef Tiny::Vector<CoordType_, dim_> FEAT::Geometry::VoxelMasker< CoordType_, dim_ >::PointType

the point type

Definition at line 76 of file voxel_map.hpp.

Constructor & Destructor Documentation

◆ VoxelChartMasker()

template<typename MeshType >
FEAT::Geometry::VoxelChartMasker< MeshType >::VoxelChartMasker ( const Geometry::Atlas::ChartBase< MeshType > &  chart,
bool  invert 
)
inlineexplicit

Constructor.

Parameters
[in]chartA resident reference to the chart object that is to be used for the inside/outside test.
[in]invertSpecifies whether inside and outside are to be swapped.

Definition at line 216 of file voxel_map.hpp.

Member Function Documentation

◆ mask_line() [1/2]

template<typename MeshType >
virtual void FEAT::Geometry::VoxelChartMasker< MeshType >::mask_line ( std::vector< int > &  mask,
const CoordType  x_min,
const CoordType  x_max,
const PointType point 
)
inlineoverridevirtual

Definition at line 222 of file voxel_map.hpp.

◆ mask_line() [2/2]

virtual void FEAT::Geometry::VoxelMasker< MeshType::CoordType , dim_ >::mask_line ( std::vector< int > &  mask,
const CoordType  x_min,
const CoordType  x_max,
const PointType point 
)
pure virtualinherited

Computes the mask for an entire X-coordinate row.

This function is called by the VoxelMap class to perform the inside/outside-test for a line of points with common Y/Z coordinates, where the X coordinates of the points have to be computed from the X-coordinate range and the number points by calling the x_coord helper function.

Attention
This function must be implemented in a thread-safe fashion, since the VoxelMap class makes use of OpenMP parallelization to speed up the map computation time.
Parameters
[in,out]maskThe mask vector for the current X-row. Is allocated to correct size, but its contents are undefined upon entry. Assuming that the length of this vector is n, then the i-th entry of the mask vector is to be set to 1 if the point with the X-coordinate equal to x_coord(x_min, x_max, i, mask.size()) is inside the mask, otherwise it is to be set to 0.
[in]x_min,x_maxThe minimal and maximal X-coordinate of the X-line for which the mask is to be computed.
[in]pointThe point that contains the Y- and (in 3D) Z-coordinates of the X-line that for which the mask is to be computed. The first coordinate, i.e. point[0], is undefined, so only point[1] and (in 3D) point[2] are set to the Y-/Z-coords.

◆ x_coord()

static CoordType FEAT::Geometry::VoxelMasker< MeshType::CoordType , dim_ >::x_coord ( const CoordType  x_min,
const CoordType  x_max,
const std::size_t  i,
const std::size_t  n 
)
inlinestaticinherited

Computes the X-coordinate for a given point.

This helper function can be used by derived classes to compute the X-coordinate for a single point on the mask line.

Parameters
[in]x_min,x_maxThe minimal and maximal X-coordinate of the X-line for which the mask is to be computed.
[in]iThe index of the current point in the X-line that is being tested
[in]nThe number of points in the line; corresponds to mask.size()
Returns
The X-coordinate of the current point

Definition at line 101 of file voxel_map.hpp.

Member Data Documentation

◆ _chart

template<typename MeshType >
const Geometry::Atlas::ChartBase<MeshType>& FEAT::Geometry::VoxelChartMasker< MeshType >::_chart
private

Definition at line 203 of file voxel_map.hpp.

◆ _invert

template<typename MeshType >
const bool FEAT::Geometry::VoxelChartMasker< MeshType >::_invert
private

Definition at line 204 of file voxel_map.hpp.


The documentation for this class was generated from the following file: