OpenVDB  5.2.0
Public Types | Public Member Functions | List of all members
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 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)

Detailed Description

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

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

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

Member Typedef Documentation

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

Constructor & Destructor Documentation

LevelSetSphere ( ValueT  radius,
const Vec3T center,
InterruptT *  interrupt = nullptr 


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.
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!

Member Function Documentation

GridT::Ptr getLevelSet ( ValueT  voxelSize,
ValueT  halfWidth 
a narrow-band level set of the sphere
voxelSizeSize of voxels in world units
halfWidthHalf-width of narrow-band in voxel units

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