template<typename PointAccessorType, typename RandomGenerator, typename InterruptType = util::NullInterrupter>
class openvdb::v10_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)
void end()
bool wasInterrupted(int percent=-1)
};
- 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)
- Note
- 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).
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.