OpenVDB  12.1.0
Public Member Functions | List of all members
TubeComplexVoxelizer< GridType, ScalarType, InterruptT, PerSegmentRadii > Class Template Reference

Class used to generate a grid of type GridType containing a narrow-band level set representation of a tube complex. More...

#include <openvdb/tools/impl/LevelSetTubesImpl.h>

Public Member Functions

 TubeComplexVoxelizer (const std::vector< Vec3T > &vertices, const std::vector< Vec2I > &segments, ScalarType radius, float voxelSize, float halfWidth, InterruptT *interrupter)
 Constructor for constant radius. More...
 
 TubeComplexVoxelizer (const std::vector< Vec3T > &vertices, const std::vector< Vec2I > &segments, const std::vector< ScalarType > &radii, float voxelSize, float halfWidth, InterruptT *interrupter)
 Constructor for varying radii. More...
 
 TubeComplexVoxelizer (TubeComplexVoxelizer &other, tbb::split)
 
template<bool PSR = PerSegmentRadii>
std::enable_if_t< PSR, void > operator() (const tbb::blocked_range< size_t > &rng)
 
template<bool PSR = PerSegmentRadii>
std::enable_if_t<!PSR, void > operator() (const tbb::blocked_range< size_t > &rng)
 
void join (TubeComplexVoxelizer &other)
 
Index64 bucketSize () const
 
GridPtr getGrid () const
 

Detailed Description

template<typename GridType, typename ScalarType = float, typename InterruptT = util::NullInterrupter, bool PerSegmentRadii = true>
class openvdb::v12_1::tools::lvlset::TubeComplexVoxelizer< GridType, ScalarType, InterruptT, PerSegmentRadii >

Class used to generate a grid of type GridType containing a narrow-band level set representation of a tube complex.

Note
GridType::ValueType must be a floating-point scalar.
ScalarType represents the capsule complex vertex and radius type and must be a floating-point scalar.
Setting PerSegmentRadii to true gives a complex of capsules and a complex of tapered capsules otherwise.

Constructor & Destructor Documentation

TubeComplexVoxelizer ( const std::vector< Vec3T > &  vertices,
const std::vector< Vec2I > &  segments,
ScalarType  radius,
float  voxelSize,
float  halfWidth,
InterruptT *  interrupter 
)
inline

Constructor for constant radius.

Parameters
verticesendpoint vertices in the tube complex in world units
segmentssegment indices in the tube complex
radiusradius of all tubes in world units
voxelSizevoxel size in world units
backgroundbackground value in voxel units
interrupterpointer to optional interrupter. Use template argument util::NullInterrupter if no interruption is desired.
TubeComplexVoxelizer ( const std::vector< Vec3T > &  vertices,
const std::vector< Vec2I > &  segments,
const std::vector< ScalarType > &  radii,
float  voxelSize,
float  halfWidth,
InterruptT *  interrupter 
)
inline

Constructor for varying radii.

Parameters
verticesendpoint vertices in the tube complex in world units
segmentssegment indices in the tube complex
radiiradii specification for all tubes in world units
voxelSizevoxel size in world units
halfWidthhalf-width value in voxel units
interrupterpointer to optional interrupter. Use template argument util::NullInterrupter if no interruption is desired.
Note
If PerSegmentRadii is set to true then segments and radii must have the same size. If PerSegmentRadii is set to false then vertices and radii must have the same size.
TubeComplexVoxelizer ( TubeComplexVoxelizer< GridType, ScalarType, InterruptT, PerSegmentRadii > &  other,
tbb::split   
)
inline

Member Function Documentation

Index64 bucketSize ( ) const
inline
GridPtr getGrid ( ) const
inline
void join ( TubeComplexVoxelizer< GridType, ScalarType, InterruptT, PerSegmentRadii > &  other)
inline
std::enable_if_t<PSR, void> operator() ( const tbb::blocked_range< size_t > &  rng)
inline
std::enable_if_t<!PSR, void> operator() ( const tbb::blocked_range< size_t > &  rng)
inline