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 <openvdb/tools/PointScatter.h>
Inherits BasePointScatter< PointAccessorType, RandomGenerator, InterruptType >.
|
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) |
|
template<typename PointAccessorType, typename RandomGenerator, typename InterruptType = util::NullInterrupter>
class openvdb::v9_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 (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.
NonUniformPointScatter |
( |
PointAccessorType & |
points, |
|
|
float |
pointsPerVolume, |
|
|
RandomGenerator & |
randGen, |
|
|
double |
spread = 1.0 , |
|
|
InterruptType * |
interrupt = nullptr |
|
) |
| |
|
inline |
void addPoint |
( |
const GridT & |
grid, |
|
|
const Vec3R & |
dmin |
|
) |
| |
|
inlineprotectedinherited |
void addPoint |
( |
const GridT & |
grid, |
|
|
const Vec3R & |
dmin, |
|
|
const Coord & |
size |
|
) |
| |
|
inlineprotectedinherited |
float getPointPerVolume |
( |
| ) |
const |
|
inline |
Return a random floating point number between 0.5 -+ mSpread/2.
Return a random floating point number between zero and one.
bool 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 |
void start |
( |
const char * |
name | ) |
|
|
inlineprotectedinherited |
InterruptType* mInterrupter |
|
protectedinherited |
PointAccessorType& mPoints |
|
protectedinherited |