OpenVDB  1.2.0
Classes | Public Types | Public Member Functions | List of all members
CopyFromDense< TreeT > Class Template Reference

Copy the values from a dense grid into an OpenVDB tree. More...

#include <Dense.h>

Public Types

typedef TreeT::ValueType ValueT
 
typedef TreeT::LeafNodeType LeafT
 

Public Member Functions

 CopyFromDense (const Dense< ValueT > &dense, TreeT &tree, const ValueT &tolerance)
 
void copy (bool serial=false)
 Copy values from the dense grid to the sparse tree. More...
 
void operator() (const tbb::blocked_range< size_t > &r) const
 Public method called by tbb::parallel_for. More...
 

Detailed Description

template<typename TreeT>
class openvdb::v1_2_0::tools::CopyFromDense< TreeT >

Copy the values from a dense grid into an OpenVDB tree.

Values in the dense grid that are within a tolerance of the background value are truncated to inactive background voxels or tiles. This allows the tree to form a sparse representation of the dense grid.

Note
Since this class allocates leaf nodes concurrently it is recommended to use a scalable implementation of new like the one provided by TBB, rather than the mutex-protected standard library new.

Member Typedef Documentation

typedef TreeT::LeafNodeType LeafT
typedef TreeT::ValueType ValueT

Constructor & Destructor Documentation

CopyFromDense ( const Dense< ValueT > &  dense,
TreeT &  tree,
const ValueT tolerance 
)
inline

Member Function Documentation

void copy ( bool  serial = false)
inline

Copy values from the dense grid to the sparse tree.

void operator() ( const tbb::blocked_range< size_t > &  r) const
inline

Public method called by tbb::parallel_for.


The documentation for this class was generated from the following file: