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

Generates a signed distance field (or narrow band level set) to a single sphere. More...

#include <LevelSetSphere.h>

Public Types

using TreeT = typename GridT::TreeType
 
using ValueT = typename GridT::ValueType
 
using Vec3T = typename math::Vec3< ValueT >
 

Public Member Functions

 LevelSetSphere (ValueT radius, const Vec3T &center, InterruptT *interrupt=nullptr)
 Constructor. More...
 
GridT::Ptr getLevelSet (ValueT voxelSize, ValueT halfWidth, bool threaded=true)
 

Detailed Description

template<typename GridT, typename InterruptT = util::NullInterrupter>
class openvdb::OPENVDB_VERSION_NAME::tools::LevelSetSphere< GridT, InterruptT >

Generates a signed distance field (or narrow band level set) to a single sphere.

Note
The leapfrog algorithm employed in this class is best suited for a single large sphere. For multiple small spheres consider using the faster algorithm in tools/ParticlesToLevelSet.h

Definition at line 88 of file LevelSetSphere.h.

Member Typedef Documentation

template<typename GridT, typename InterruptT = util::NullInterrupter>
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetSphere< GridT, InterruptT >::TreeT = typename GridT::TreeType

Definition at line 91 of file LevelSetSphere.h.

template<typename GridT, typename InterruptT = util::NullInterrupter>
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetSphere< GridT, InterruptT >::ValueT = typename GridT::ValueType

Definition at line 92 of file LevelSetSphere.h.

template<typename GridT, typename InterruptT = util::NullInterrupter>
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetSphere< GridT, InterruptT >::Vec3T = typename math::Vec3<ValueT>

Definition at line 93 of file LevelSetSphere.h.

Constructor & Destructor Documentation

template<typename GridT, typename InterruptT = util::NullInterrupter>
openvdb::OPENVDB_VERSION_NAME::tools::LevelSetSphere< GridT, InterruptT >::LevelSetSphere ( ValueT  radius,
const Vec3T center,
InterruptT *  interrupt = nullptr 
)
inline

Constructor.

Parameters
radiusradius of the sphere in world units
centercenter of the sphere in world units
interruptpointer to optional interrupter. Use template argument util::NullInterrupter if no interruption is desired.
Note
If the radius of the sphere is smaller than 1.5*voxelSize, i.e. the sphere is smaller than the Nyquist frequency of the grid, it is ignored!

Definition at line 107 of file LevelSetSphere.h.

Member Function Documentation

template<typename GridT, typename InterruptT = util::NullInterrupter>
GridT::Ptr openvdb::OPENVDB_VERSION_NAME::tools::LevelSetSphere< GridT, InterruptT >::getLevelSet ( ValueT  voxelSize,
ValueT  halfWidth,
bool  threaded = true 
)
inline
Returns
a narrow-band level set of the sphere
Parameters
voxelSizeSize of voxels in world units
halfWidthHalf-width of narrow-band in voxel units
threadedIf true multi-threading is enabled (true by default)

Definition at line 118 of file LevelSetSphere.h.


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