HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
#include "impl/PointScatterImpl.h"
+ Include dependency graph for PointScatter.h:

Go to the source code of this file.

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::points
 

Functions

template<typename GridT , typename RandGenT , typename PositionArrayT , typename PointDataGridT , typename InterrupterT >
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::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 , typename PositionArrayT , typename PointDataGridT , typename InterrupterT >
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::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 , typename PositionArrayT , typename PointDataGridT , typename InterrupterT >
PointDataGridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::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.

Definition in file PointScatter.h.