Public Member Functions |
| UniformPointScatter (PointAccessorType &points, int pointCount, RandomGenerator &randGen, InterruptType *interrupt=NULL) |
| UniformPointScatter (PointAccessorType &points, float pointsPerVolume, RandomGenerator &randGen, InterruptType *interrupt=NULL) |
template<typename GridT > |
void | 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 |
int | getPointCount () const |
float | getPointsPerVolume () const |
openvdb::Index64 | getVoxelCount () const |
template<typename PointAccessorType, typename RandomGenerator, typename InterruptType = openvdb::util::NullInterrupter>
class openvdb::v1_1_0::tools::UniformPointScatter< PointAccessorType, RandomGenerator, InterruptType >
The two point scatters UniformPointScatter and NonUniformPointScatter depend on the following two classes:
The @c PointAccessorType template argument below refers to any class
with the following interface:
@code
class PointAccessor { ... public: void add(const openvdb::Vec3R &pos);// appends point with world positions pos };
The InterruptType
template argument below refers to any class with the following interface:
class Interrupter {
...
public:
void start(const char* name = NULL)
void end()
};
- 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). Uniform scatters of point 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).