OpenVDB 11.0.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DenseUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType > Class Template Reference

Scatters a fixed (and integer) number of points in all active voxels and tiles. More...

`#include <openvdb/tools/PointScatter.h>`

Inheritance diagram for DenseUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >:

## Public Types
using | BaseT = BasePointScatter< PointAccessorType, RandomGenerator, InterruptType >

## Public Member Functions
| DenseUniformPointScatter (PointAccessorType &points, float pointsPerVoxel, RandomGenerator &randGen, double spread=1.0, InterruptType *interrupt=nullptr)
template<typename GridT >
bool | operator() (const GridT &grid)
| This is the main functor method implementing the actual scattering of points.
void | print (const std::string &name, std::ostream &os=std::cout) const
float | getPointsPerVoxel () 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.
double | getRand ()
| Return a random floating point number between 0.5 -+ mSpread/2.
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 | mInterruptCount
const double | mSpread
math::Rand01< double, RandomGenerator > | mRand01

## Detailed Description

template<typename PointAccessorType, typename RandomGenerator, typename InterruptType = util::NullInterrupter>
class openvdb::v11_0::tools::DenseUniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >

Scatters a fixed (and integer) number of points in all active voxels and tiles.

## Member Typedef Documentation

## ◆ BaseT

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>

using BaseT = BasePointScatter<PointAccessorType, RandomGenerator, InterruptType>

## Constructor & Destructor Documentation

## ◆ DenseUniformPointScatter()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>

DenseUniformPointScatter | ( | PointAccessorType & | points,
|  | float | pointsPerVoxel,
|  | RandomGenerator & | randGen,
|  | double | spread = `1.0`,
|  | InterruptType * | interrupt = `nullptr`
| ) |  |
| inline

## Member Function Documentation

## ◆ addPoint() [1/2]

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >
template<typename GridT >

void addPoint | ( | const GridT & | grid,
|  | const Vec3R & | dmin
| ) |  |
| inline protected inherited

## ◆ addPoint() [2/2]

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >
template<typename GridT >

void addPoint | ( | const GridT & | grid,
|  | const Vec3R & | dmin,
|  | const Coord & | size
| ) |  |
| inline protected inherited

## ◆ end()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

void end | ( |  | ) |
| inline protected inherited

## ◆ getPointCount()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

Index64 getPointCount | ( |  | ) | const
| inline inherited

## ◆ getPointsPerVoxel()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>

float getPointsPerVoxel | ( |  | ) | const
| inline

## ◆ getRand()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

double getRand | ( |  | ) |
| inline protected inherited

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

## ◆ getRand01()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

double getRand01 | ( |  | ) |
| inline protected inherited

Return a random floating point number between zero and one.

## ◆ getVoxelCount()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

Index64 getVoxelCount | ( |  | ) | const
| inline inherited

## ◆ interrupt()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

bool interrupt | ( |  | ) |
| inline protected inherited

## ◆ operator()()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>
template<typename GridT >

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

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

## ◆ print()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType = util::NullInterrupter>

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

## ◆ start()

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

void start | ( | const char * | name | ) |
| inline protected inherited

## Member Data Documentation

## ◆ mInterruptCount

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

Index64 mInterruptCount
| protected inherited

## ◆ mInterrupter

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

InterruptType* mInterrupter
| protected inherited

## ◆ mPoints

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

PointAccessorType& mPoints
| protected inherited

## ◆ mRand01

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

math::Rand01<double, RandomGenerator> mRand01
| protected inherited

## ◆ mSpread

template<typename PointAccessorType , typename RandomGenerator , typename InterruptType >

const double mSpread
| protected inherited