OpenVDB: openvdb/points/PointScatter.h File Reference

OpenVDB 9.0.0

Namespaces | Functions
PointScatter.h File Reference

Various point scattering methods for generating VDB Points. More...

`#include <type_traits>`
`#include <algorithm>`
`#include <thread>`
`#include <random>`
`#include <openvdb/openvdb.h>`
`#include <openvdb/Types.h>`
`#include <openvdb/tree/LeafManager.h>`
`#include <openvdb/tools/Prune.h>`
`#include <openvdb/util/NullInterrupter.h>`
`#include "AttributeArray.h"`
`#include "PointCount.h"`
`#include "PointDataGrid.h"`
`#include <tbb/parallel_sort.h>`
`#include <tbb/parallel_for.h>`

Go to the source code of this file.

## Namespaces
namespace | openvdb
namespace | openvdb::v9_0
namespace | openvdb::v9_0::points

## Functions
template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr | uniformPointScatter (const GridT &grid, const Index64 count, const unsigned int seed=0, const float spread=1.0f, InterrupterT *interrupter=nullptr)
| The free functions depend on the following class: More...
template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr | denseUniformPointScatter (const GridT &grid, const float pointsPerVoxel, const unsigned int seed=0, const float spread=1.0f, InterrupterT *interrupter=nullptr)
| Uniformly scatter a fixed number of points per active voxel. If the pointsPerVoxel value provided is a fractional value, each voxel calculates a delta value of how likely it is to contain an extra point. More...
template<typename GridT , typename RandGenT = std::mt19937, typename PositionArrayT = TypedAttributeArray<Vec3f, NullCodec>, typename PointDataGridT = Grid< typename points::TreeConverter<typename GridT::TreeType>::Type>, typename InterrupterT = util::NullInterrupter>
PointDataGridT::Ptr | nonUniformPointScatter (const GridT &grid, const float pointsPerVoxel, const unsigned int seed=0, const float spread=1.0f, InterrupterT *interrupter=nullptr)
| Non uniformly scatter points per active voxel. The pointsPerVoxel value is used to weight each grids cell value to compute a fixed number of points for every active voxel. If the computed result is a fractional value, each voxel calculates a delta value of how likely it is to contain an extra point. More...

## Detailed Description

Various point scattering methods for generating VDB Points.

Author
  Nick Avramoussis

All random number calls are made to the same generator to produce temporarily consistent results in relation to the provided seed. This comes with some multi-threaded performance trade-offs.