Loading...
Searching...
No Matches
LevelSetSphere< GridT, InterruptT > Class Template Reference

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

`#include <openvdb/tools/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.
GridT::Ptr | getLevelSet (ValueT voxelSize, ValueT halfWidth, bool threaded=true)

## Detailed Description

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

## TreeT

template<typename GridT , typename InterruptT = util::NullInterrupter>

using TreeT = typename GridT::TreeType

## ValueT

template<typename GridT , typename InterruptT = util::NullInterrupter>

using ValueT = typename GridT::ValueType

## Vec3T

template<typename GridT , typename InterruptT = util::NullInterrupter>

using Vec3T = typename math::Vec3<ValueT>

## Constructor & Destructor Documentation

## LevelSetSphere()

template<typename GridT , typename InterruptT = util::NullInterrupter>

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

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

## getLevelSet()

template<typename GridT , typename InterruptT = util::NullInterrupter>

GridT::Ptr getLevelSet | ( | ValueT | voxelSize,
|  | ValueT | halfWidth,
|  | bool | threaded = `true`
| ) |  |

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
  threaded | If true multi-threading is enabled (true by default)