OpenVDB: NonUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType > Class Template Reference

OpenVDB 4.0.2

Public Types | 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 (called pointsPerVolume) and the local voxel (or tile) value. More...

`#include <PointScatter.h>`

Inherits BasePointScatter< 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
Index64 | getPointCount () const
Index64 | getVoxelCount () const

## Protected Member Functions
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
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::v4_0_2::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.

## Member Typedef Documentation

## ◆ BaseT

typedef BasePointScatter<PointAccessorType, RandomGenerator, InterruptType> BaseT

## Constructor & Destructor Documentation

## ◆ NonUniformPointScatter()

NonUniformPointScatter | ( | PointAccessorType & | points,
|  | float | pointsPerVolume,
|  | RandomGenerator & | randGen,
|  | double | spread = `1.0`,
|  | InterruptType * | interrupt = `NULL`
| ) |  |
| inline

## Member Function Documentation

## ◆ addPoint() [1/2]

void addPoint | ( | const GridT & | grid,
|  | const Vec3R & | dmin
| ) |  |
| inlineprotectedinherited

## ◆ addPoint() [2/2]

void addPoint | ( | const GridT & | grid,
|  | const Vec3R & | dmin,
|  | const Coord & | size
| ) |  |
| inlineprotectedinherited

## ◆ end()

void end | ( |  | ) |
| inlineprotectedinherited

## ◆ getPointCount()

Index64 getPointCount | ( |  | ) | const
| inlineinherited

## ◆ getPointPerVolume()

float getPointPerVolume | ( |  | ) | const
| inline

## ◆ getRand()

double getRand | ( |  | ) |
| inlineprotectedinherited

Return a random floating point number between 0.5 -+ mSpread/2.

## ◆ getRand01()

double getRand01 | ( |  | ) |
| inlineprotectedinherited

Return a random floating point number between zero and one.

## ◆ getVoxelCount()

Index64 getVoxelCount | ( |  | ) | const
| inlineinherited

## ◆ interrupt()

bool interrupt | ( |  | ) |
| inlineprotectedinherited

## ◆ operator()()

bool operator() | ( | const GridT & | grid | ) |
| inline

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

## ◆ print()

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

## ◆ start()

void start | ( | const char * | name | ) |
| inlineprotectedinherited

## Member Data Documentation

## ◆ mInterruptCount

Index64 mInterruptCount
| protectedinherited

## ◆ mInterrupter

InterruptType* mInterrupter
| protectedinherited

## ◆ mPointCount

Index64 mPointCount
| protectedinherited

## ◆ mPoints

PointAccessorType& mPoints
| protectedinherited

## ◆ mRand01

math::Rand01<double, RandomGenerator> mRand01
| protectedinherited

## ◆ mSpread

const double mSpread
| protectedinherited

## ◆ mVoxelCount

Index64 mVoxelCount
| protectedinherited

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

- PointScatter.h