OpenVDB  0.104.0
Public Member Functions | List of all members
ParticlesToLevelSet< GridT, ParticleListT, InterruptT, RealT > Class Template Reference

#include <ParticlesToLevelSet.h>

Public Member Functions

 ParticlesToLevelSet (GridT &grid, InterruptT *interrupt=NULL)
 Main constructor using a default interrupter. More...
 
 ParticlesToLevelSet (ParticlesToLevelSet &other, tbb::split)
 Copy constructor called by tbb. More...
 
virtual ~ParticlesToLevelSet ()
 
RealT getHalfWidth () const
 
RealT getVoxelSize () const
 
RealT getRmin () const
 
RealT getRmax () const
 
bool ignoredParticles () const
 
size_t getMinCount () const
 
size_t getMaxCount () const
 
void setRmin (RealT Rmin)
 set the smallest radius allowed in voxel units More...
 
void setRmax (RealT Rmax)
 set the largest radius allowed in voxel units More...
 
int getGrainSize () const
 
void setGrainSize (int grainSize)
 Set the grain-size used for multi-threading. More...
 
void rasterizeSpheres (const ParticleListT &pa)
 Rasterize a sphere per particle derived from their position and radius. All spheres are CSG unioned. More...
 
void rasterizeTrails (const ParticleListT &pa, Real delta=1.0)
 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. More...
 
void operator() (const tbb::blocked_range< size_t > &r)
 Non-const functor called by tbb::parallel_reduce threads. More...
 
void join (ParticlesToLevelSet &other)
 Method called by tbb::parallel_reduce threads. More...
 

Constructor & Destructor Documentation

ParticlesToLevelSet ( GridT &  grid,
InterruptT *  interrupt = NULL 
)
inline

Main constructor using a default interrupter.

Parameters
gridcontains the grid in which particles are rasterized
interruptcallback to interrupt a long-running process
Note
The width in voxel units of the generated narrow band level set is given by 2*background/dx, where background is the background value stored in the grid, and dx is the voxel size derived from the transform stored in the grid. Also note that -background corresponds to the constant value inside the generated narrow band level sets. Finally the default NullInterrupter should compile out interruption checks during optimization, thus incurring no run-time overhead.
ParticlesToLevelSet ( ParticlesToLevelSet< GridT, ParticleListT, InterruptT, RealT > &  other,
tbb::split   
)
inline

Copy constructor called by tbb.

virtual ~ParticlesToLevelSet ( )
inlinevirtual

Member Function Documentation

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
RealT getRmax ( ) const
inline
Returns
the largest radius allowed in voxel units
RealT getRmin ( ) const
inline
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
void join ( ParticlesToLevelSet< GridT, ParticleListT, InterruptT, RealT > &  other)
inline

Method called by tbb::parallel_reduce threads.

Note
Do not call this method directly!
void operator() ( const tbb::blocked_range< size_t > &  r)
inline

Non-const functor called by tbb::parallel_reduce threads.

Note
Do not call this method directly!
void rasterizeSpheres ( const ParticleListT &  pa)
inline

Rasterize a sphere per particle derived from their position and radius. All spheres are CSG unioned.

Parameters
paparticles with position, radius and velocity.
void rasterizeTrails ( const ParticleListT &  pa,
Real  delta = 1.0 
)
inline

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
paparticles with position, radius and velocity.
deltacontrols 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: