OpenVDB  0.104.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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 and the local voxel (or tile) value. More...

#include <PointScatter.h>

Public Member Functions

 NonUniformPointScatter (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
 
openvdb::Index64 getVoxelCount () const
 

Protected Member Functions

double getRand ()
 
template<typename GridT >
void addPoint (const GridT &grid, const openvdb::Vec3R &pos, const openvdb::Vec3R &delta)
 
template<typename GridT >
void addPoint (const GridT &grid, const openvdb::Vec3R &dmin)
 
template<typename GridT >
void addPoint (const GridT &grid, const openvdb::Vec3R &dmin, const openvdb::Coord &size)
 

Protected Attributes

PointAccessorType & mPoints
 
InterruptType * mInterrupter
 
int mPointCount
 
float mPointsPerVolume
 
openvdb::Index64 mVoxelCount
 
RandomGenerator & mRandomGen
 
boost::uniform_01< double > mRandom
 

Detailed Description

template<typename PointAccessorType, typename RandomGenerator, typename InterruptType = openvdb::util::NullInterrupter>
class openvdb::v0_104_0::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 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.

Constructor & Destructor Documentation

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

Member Function Documentation

void addPoint ( const GridT &  grid,
const openvdb::Vec3R pos,
const openvdb::Vec3R delta 
)
inlineprotected
void addPoint ( const GridT &  grid,
const openvdb::Vec3R dmin 
)
inlineprotected
void addPoint ( const GridT &  grid,
const openvdb::Vec3R dmin,
const openvdb::Coord size 
)
inlineprotected
int getPointCount ( ) const
inline
double getRand ( )
inlineprotected
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

Member Data Documentation

InterruptType* mInterrupter
protected
int mPointCount
protected
PointAccessorType& mPoints
protected
float mPointsPerVolume
protected
boost::uniform_01<double> mRandom
protected
RandomGenerator& mRandomGen
protected
openvdb::Index64 mVoxelCount
protected

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