The two point scatters UniformPointScatter and NonUniformPointScatter depend on the following two classes:
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::v12_0::tools::UniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >
The two point scatters UniformPointScatter and NonUniformPointScatter depend on the following two classes:
The PointAccessorType
template argument below refers to any class with the following interface:
class PointAccessor {
...
public:
};
The InterruptType
template argument below refers to any class with the following interface:
class Interrupter {
...
public:
void start(
const char* name =
nullptr)
};
- Note
- If no template argument is provided for this InterruptType the util::NullInterrupter is used which implies that all interrupter calls are no-ops (i.e. incurs no computational overhead). Uniformly scatters points in the active voxels. The point count is either explicitly defined or implicitly through the specification of a global density (=points-per-volume)
-
This uniform scattering technique assumes that the number of points is generally smaller than the number of active voxels (including virtual active voxels in active tiles).
UniformPointScatter |
( |
PointAccessorType & |
points, |
|
|
Index64 |
pointCount, |
|
|
RandomGenerator & |
randGen, |
|
|
double |
spread = 1.0 , |
|
|
InterruptType * |
interrupt = nullptr |
|
) |
| |
|
inline |
UniformPointScatter |
( |
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 getPointsPerVolume |
( |
| ) |
const |
|
inline |
Return a random floating point number between 0.5 -+ mSpread/2.
Return a random floating point number between zero and one.
Index64 getTargetPointCount |
( |
| ) |
const |
|
inline |
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 |