HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType > Class Template Reference

Non-uniform scatters of point in the active voxels. The local point count is implicitly defined as a product of of a global density (called pointsPerVolume) and the local voxel (or tile) value. More...

#include <PointScatter.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >:

Public Types

typedef BasePointScatter
< PointAccessorType,
RandomGenerator, InterruptType > 
BaseT
 

Public Member Functions

 NonUniformPointScatter (PointAccessorType &points, float pointsPerVolume, RandomGenerator &randGen, double spread=1.0, InterruptType *interrupt=NULL)
 
template<typename GridT >
bool 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
 
float getPointPerVolume () const
 
- Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tools::BasePointScatter< PointAccessorType, RandomGenerator, InterruptType >
Index64 getPointCount () const
 
Index64 getVoxelCount () const
 

Additional Inherited Members

- Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::tools::BasePointScatter< PointAccessorType, RandomGenerator, InterruptType >
 BasePointScatter (PointAccessorType &points, RandomGenerator &randGen, double spread, InterruptType *interrupt=NULL)
 This is a base class so the constructor is protected. More...
 
void start (const char *name)
 
void end ()
 
bool interrupt ()
 
double getRand01 ()
 Return a random floating point number between zero and one. More...
 
double getRand ()
 Return a random floating point number between 0.5 -+ mSpread/2. More...
 
template<typename GridT >
void addPoint (const GridT &grid, const Vec3R &dmin)
 
template<typename GridT >
void addPoint (const GridT &grid, const Vec3R &dmin, const Coord &size)
 
- Protected Attributes inherited from openvdb::OPENVDB_VERSION_NAME::tools::BasePointScatter< PointAccessorType, RandomGenerator, InterruptType >
PointAccessorType & mPoints
 
InterruptType * mInterrupter
 
Index64 mPointCount
 
Index64 mVoxelCount
 
Index64 mInterruptCount
 
const double mSpread
 
math::Rand01< double,
RandomGenerator > 
mRand01
 

Detailed Description

template<typename PointAccessorType, typename RandomGenerator, typename InterruptType = util::NullInterrupter>
class openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >

Non-uniform scatters of point in the active voxels. The local point count is implicitly defined as a product of of a global density (called pointsPerVolume) and the local voxel (or tile) value.

Note
This scattering technique can be significantly slower than a uniform scattering since its computational complexity is proportional to the active voxel (and tile) count.

Definition at line 295 of file PointScatter.h.

Member Typedef Documentation

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>
typedef BasePointScatter<PointAccessorType, RandomGenerator, InterruptType> openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >::BaseT

Definition at line 300 of file PointScatter.h.

Constructor & Destructor Documentation

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>
openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >::NonUniformPointScatter ( PointAccessorType &  points,
float  pointsPerVolume,
RandomGenerator &  randGen,
double  spread = 1.0,
InterruptType *  interrupt = NULL 
)
inline

Definition at line 302 of file PointScatter.h.

Member Function Documentation

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>
float openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >::getPointPerVolume ( ) const
inline

Definition at line 354 of file PointScatter.h.

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>
template<typename GridT >
bool openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >::operator() ( const GridT &  grid)
inline

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

Definition at line 315 of file PointScatter.h.

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>
void openvdb::OPENVDB_VERSION_NAME::tools::NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >::print ( const std::string name,
std::ostream &  os = std::cout 
) const
inline

Definition at line 348 of file PointScatter.h.


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