OpenVDB  2.1.0
Public Member Functions | List of all members
UniformPointScatter< PointAccessorType, RandomGenerator, InterruptType > Class Template Reference

The two point scatters UniformPointScatter and NonUniformPointScatter depend on the following two classes: More...

#include <PointScatter.h>

Public Member Functions

 UniformPointScatter (PointAccessorType &points, int pointCount, RandomGenerator &randGen, InterruptType *interrupt=NULL)
 
 UniformPointScatter (PointAccessorType &points, float pointsPerVolume, RandomGenerator &randGen, InterruptType *interrupt=NULL)
 
template<typename GridT >
void operator() (const GridT &grid)
 This is the main functor method implementing the actual scattering of points. More...
 
void print (const std::string &name, std::ostream &os=std::cout) const
 
int getPointCount () const
 
float getPointsPerVolume () const
 
openvdb::Index64 getVoxelCount () const
 

Detailed Description

template<typename PointAccessorType, typename RandomGenerator, typename InterruptType = openvdb::util::NullInterrupter>
class openvdb::v2_1_0::tools::UniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >

The two point scatters UniformPointScatter and NonUniformPointScatter depend on the following two classes:

The PointAccessorType template argument below refers to any class with the following interface:

* class PointAccessor {
* ...
* public:
* void add(const openvdb::Vec3R &pos);// appends point with world positions pos
* };
*

The InterruptType template argument below refers to any class with the following interface:

* class Interrupter {
* ...
* public:
* void start(const char* name = NULL)// called when computations begin
* void end() // called when computations end
* bool wasInterrupted(int percent=-1)// return true to break computation
* };
*
Note
If no template argument is provided for this InterruptType the util::NullInterrupter is used which implies that all interrupter calls are no-ops (i.e. incurs no computational overhead). Uniform scatters of point in the active voxels. The point count is either explicitly defined or implicitly through the specification of a global density (=points-per-volume)
This uniform scattering technique assumes that the number of points is generally smaller than the number of active voxels (including virtual active voxels in active tiles).

Constructor & Destructor Documentation

UniformPointScatter ( PointAccessorType &  points,
int  pointCount,
RandomGenerator &  randGen,
InterruptType *  interrupt = NULL 
)
inline
UniformPointScatter ( PointAccessorType &  points,
float  pointsPerVolume,
RandomGenerator &  randGen,
InterruptType *  interrupt = NULL 
)
inline

Member Function Documentation

int getPointCount ( ) const
inline
float getPointsPerVolume ( ) const
inline
openvdb::Index64 getVoxelCount ( ) const
inline
void operator() ( const GridT &  grid)
inline

This is the main functor method implementing the actual scattering of points.

void print ( const std::string &  name,
std::ostream &  os = std::cout 
) const
inline

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