HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::lvlset::CapsuleVoxelizer< GridType, InterruptT > Class Template Reference

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

#include <LevelSetTubesImpl.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tools::lvlset::CapsuleVoxelizer< GridType, InterruptT >:

Public Member Functions

 CapsuleVoxelizer (GridPtr &grid, const bool &threaded=true, InterruptT *interrupter=nullptr)
 Constructor. More...
 
template<typename ScalarType >
void operator() (const math::Vec3< ScalarType > &pt1, const math::Vec3< ScalarType > &pt2, const ScalarType &r)
 Create a capsule. More...
 
- Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tools::ConvexVoxelizer< GridType, CapsuleVoxelizer< GridType, InterruptT >, InterruptT >
 ConvexVoxelizer (GridPtr &grid, const bool &threaded=false, InterruptT *interrupter=nullptr)
 Constructor. More...
 
virtual ~ConvexVoxelizer ()=default
 
ValueT voxelSize () const
 Return the voxel size of the grid. More...
 
ValueT halfWidth () const
 Return the half width of the narrow-band level set. More...
 

Friends

class ConvexVoxelizer< GridType, CapsuleVoxelizer< GridType, InterruptT >, InterruptT >
 

Additional Inherited Members

- Protected Types inherited from openvdb::OPENVDB_VERSION_NAME::tools::ConvexVoxelizer< GridType, CapsuleVoxelizer< GridType, InterruptT >, InterruptT >
using ValueT = typename GridType::ValueType
 
using Vec3T = math::Vec3< ValueT >
 
using Vec2T = math::Vec2< ValueT >
 
- Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tools::ConvexVoxelizer< GridType, CapsuleVoxelizer< GridType, InterruptT >, InterruptT >
void iterate ()
 The function the derived class calls to create the level set, working in index space other than setting signed distance values. More...
 
void setXYRangeData (const Index &)
 Determines the x bounds in index space of the convex region dilated by the half width. For each x value in index space, the y range in index space of the dilated region is computed. This function should store the data in mXYData. More...
 
bool tileCanFit (const Index &) const
 Checks if the tile of a given dimension can possibly fit within the region. More...
 
ValueT signedDistance (const Vec3T &) const
 Computes the signed distance from a point to the convex region in index space. More...
 
ValueT tilePointSignedDistance (const Vec3T &p) const
 Computes the signed distance for tiles in index space, considering the center of the tile. This method is optional to override and defaults to signedDistance. More...
 
- Static Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tools::ConvexVoxelizer< GridType, CapsuleVoxelizer< GridType, InterruptT >, InterruptT >
static ValueT tileCeil (const ValueT &x, const ValueT &step)
 Rounds an input scalar up to the nearest valid ordinate of tile of a specified size. More...
 
static ValueT tileCeil (const ValueT &x, const T &step)
 Rounds an input scalar up to the nearest valid ordinate of tile of a specified size. More...
 
static ValueT tileFloor (const ValueT &x, const ValueT &step)
 Rounds an input scalar down to the nearest valid ordinate of tile of a specified size. More...
 
static ValueT tileFloor (const ValueT &x, const T &step)
 Rounds an input scalar down to the nearest valid ordinate of tile of a specified size. More...
 
static ValueT circleBottom (const ValueT &x0, const ValueT &y0, const ValueT &r, const ValueT &x)
 Computes the bottom y-coordinate of a circle at a given x position. More...
 
static ValueT circleTop (const ValueT &x0, const ValueT &y0, const ValueT &r, const ValueT &x)
 Computes the top y-coordinate of a circle at a given x position. More...
 
static ValueT sphereBottom (const ValueT &x0, const ValueT &y0, const ValueT &z0, const ValueT &r, const ValueT &x, const ValueT &y)
 Computes the bottom z-coordinate of a sphere at a given (x, y) position. More...
 
static ValueT sphereTop (const ValueT &x0, const ValueT &y0, const ValueT &z0, const ValueT &r, const ValueT &x, const ValueT &y)
 Computes the top z-coordinate of a sphere at a given (x, y) position. More...
 
- Protected Attributes inherited from openvdb::OPENVDB_VERSION_NAME::tools::ConvexVoxelizer< GridType, CapsuleVoxelizer< GridType, InterruptT >, InterruptT >
std::function< bool(ValueT
&, ValueT &, const ValueT
&, const ValueT &)> 
bottomTop
 Find where a vertical infinite line intersects a convex region dilated by the half width. More...
 
XYRangeData mXYData
 

Detailed Description

template<typename GridType, typename InterruptT = util::NullInterrupter>
class openvdb::OPENVDB_VERSION_NAME::tools::lvlset::CapsuleVoxelizer< GridType, InterruptT >

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

Note
GridType::ValueType must be a floating-point scalar.

Definition at line 48 of file LevelSetTubesImpl.h.

Constructor & Destructor Documentation

template<typename GridType, typename InterruptT = util::NullInterrupter>
openvdb::OPENVDB_VERSION_NAME::tools::lvlset::CapsuleVoxelizer< GridType, InterruptT >::CapsuleVoxelizer ( GridPtr &  grid,
const bool &  threaded = true,
InterruptT *  interrupter = nullptr 
)
inline

Constructor.

Parameters
gridscalar grid to populate the level set in
threadedcenter of the sphere in world units
interrupterpointer to optional interrupter. Use template argument util::NullInterrupter if no interruption is desired.
Note
The voxel size and half width are determined from the input grid, meaning the voxel size and background value need to be set prior to voxelization

Definition at line 86 of file LevelSetTubesImpl.h.

Member Function Documentation

template<typename GridType, typename InterruptT = util::NullInterrupter>
template<typename ScalarType >
void openvdb::OPENVDB_VERSION_NAME::tools::lvlset::CapsuleVoxelizer< GridType, InterruptT >::operator() ( const math::Vec3< ScalarType > &  pt1,
const math::Vec3< ScalarType > &  pt2,
const ScalarType &  r 
)
inline

Create a capsule.

Parameters
pt1first endpoint of the capsule in world units
pt2second endpoint of the capsule in world units
radiusradius of the capsule in world units

Definition at line 99 of file LevelSetTubesImpl.h.

Friends And Related Function Documentation

template<typename GridType, typename InterruptT = util::NullInterrupter>
friend class ConvexVoxelizer< GridType,CapsuleVoxelizer< GridType, InterruptT >,InterruptT >
friend

Definition at line 75 of file LevelSetTubesImpl.h.


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