Use this wrapper class to convert particles into a level set and a separate index grid of closest-point particle id. The latter can be used to subsequently transfer particles attributes into separate grids.
More...
#include <ParticlesToLevelSet.h>
template<typename LevelSetGridT, typename ParticleListT, typename InterruptT = util::NullInterrupter>
class openvdb::v0_104_0::tools::ParticlesToLevelSetAndId< LevelSetGridT, ParticleListT, InterruptT >
Use this wrapper class to convert particles into a level set and a separate index grid of closest-point particle id. The latter can be used to subsequently transfer particles attributes into separate grids.
- Note
- This class has the same API as ParticlesToLevelSet - the only exception being the raster methods that return the index grid!
typedef LevelSetGridT::ValueType RealT |
int getGrainSize |
( |
| ) |
const |
|
inline |
- Returns
- the grain-size used for multi-threading
RealT getHalfWidth |
( |
| ) |
const |
|
inline |
- Returns
- Half-width (in voxle units) of the narrow band level set
size_t getMaxCount |
( |
| ) |
const |
|
inline |
- Returns
- number of large particles that were ignore due to Rmax
size_t getMinCount |
( |
| ) |
const |
|
inline |
- Returns
- number of small particles that were ignore due to Rmin
- Returns
- the largest radius allowed in voxel units
- Returns
- the smallest radius allowed in voxel units
RealT getVoxelSize |
( |
| ) |
const |
|
inline |
- Returns
- Voxel size in world units
bool ignoredParticles |
( |
| ) |
const |
|
inline |
- Returns
- true if any particles were ignored due to their size
Rasterize a sphere per particle derived from their position and radius. All spheres are CSG unioned.
- Returns
- An index grid storing the id of the closest particle.
- Parameters
-
pa | particles with position, radius and velocity. |
Rasterize a trail per particle derived from their position, radius and velocity. Each trail is generated as CSG unions of sphere instances with decreasing radius.
- Parameters
-
pa | particles with position, radius and velocity. |
delta | controls distance between sphere instances (default=1). Be careful not to use too small values since this can lead to excessive computation per trail (which the interrupter can't stop). |
- Note
- The direction of a trail is inverse to the direction of the velocity vector, and the length is given by |V|. The radius at the head of the trail is given by the radius of the particle and the radius at the tail of the trail is Rmin voxel units which has a default value of 1.5 corresponding to the Nyquist frequency!
void setGrainSize |
( |
int |
grainSize | ) |
|
|
inline |
Set the grain-size used for multi-threading.
- Note
- A grainsize of 0 or less disables multi-threading!
void setRmax |
( |
RealT |
Rmax | ) |
|
|
inline |
set the largest radius allowed in voxel units
void setRmin |
( |
RealT |
Rmin | ) |
|
|
inline |
set the smallest radius allowed in voxel units
The documentation for this class was generated from the following file: