OpenVDB: LevelSetSphere< GridT, InterruptT > Class Template Reference

OpenVDB 3.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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
typedef GridT::ValueType | ValueT
typedef math::Vec3< ValueT > | Vec3T

## Public Member Functions
| BOOST_STATIC_ASSERT (boost::is_floating_point< ValueT >::value)
| LevelSetSphere (ValueT radius, const Vec3T &center, InterruptT *interrupt=NULL)
| Constructor. More...
GridT::Ptr | getLevelSet (ValueT voxelSize, ValueT halfWidth)

## Detailed Description

### template<typename GridT, typename InterruptT = util::NullInterrupter>
class openvdb::v3_1_0::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

## Member Typedef Documentation

typedef GridT::ValueType ValueT

typedef math::Vec3<ValueT> Vec3T

## Constructor & Destructor Documentation

LevelSetSphere | ( | ValueT | radius,
|  | const Vec3T & | center,
|  | InterruptT * | interrupt = `NULL`
| ) |  |
| inline

Constructor.

Parameters

  radius | radius of the sphere in world units
  center | center of the sphere in world units
  interrupt | pointer 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!

## Member Function Documentation

BOOST_STATIC_ASSERT | ( | boost::is_floating_point< ValueT >::value |  | ) |

GridT::Ptr getLevelSet | ( | ValueT | voxelSize,
|  | ValueT | halfWidth
| ) |  |
| inline

Returns
  a narrow-band level set of the sphere

Parameters

  voxelSize | Size of voxels in world units
  halfWidth | Half-width of narrow-band in voxel units

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

- LevelSetSphere.h