OpenVDB  9.0.1
Classes | Namespaces | Functions
Prune.h File Reference

Defined various multi-threaded utility functions for trees. More...

#include <openvdb/math/Math.h>
#include <openvdb/Types.h>
#include <openvdb/tree/NodeManager.h>
#include <openvdb/openvdb.h>
#include <algorithm>
#include <type_traits>

Go to the source code of this file.

Classes

class  InactivePruneOp< TreeT, TerminationLevel >
 
class  TolerancePruneOp< TreeT, TerminationLevel >
 
class  LevelSetPruneOp< TreeT, TerminationLevel >
 

Namespaces

 openvdb
 
 openvdb::v9_0
 
 openvdb::v9_0::tools
 

Functions

template<typename TreeT >
void prune (TreeT &tree, typename TreeT::ValueType tolerance=zeroVal< typename TreeT::ValueType >(), bool threaded=true, size_t grainSize=1)
 Reduce the memory footprint of a tree by replacing with tiles any nodes whose values are all the same (optionally to within a tolerance) and have the same active state. More...
 
template<typename TreeT >
void pruneTiles (TreeT &tree, typename TreeT::ValueType tolerance=zeroVal< typename TreeT::ValueType >(), bool threaded=true, size_t grainSize=1)
 Reduce the memory footprint of a tree by replacing with tiles any non-leaf nodes whose values are all the same (optionally to within a tolerance) and have the same active state. More...
 
template<typename TreeT >
void pruneInactive (TreeT &tree, bool threaded=true, size_t grainSize=1)
 Reduce the memory footprint of a tree by replacing with background tiles any nodes whose values are all inactive. More...
 
template<typename TreeT >
void pruneInactiveWithValue (TreeT &tree, const typename TreeT::ValueType &value, bool threaded=true, size_t grainSize=1)
 Reduce the memory footprint of a tree by replacing any nodes whose values are all inactive with tiles of the given value. More...
 
template<typename TreeT >
void pruneLevelSet (TreeT &tree, bool threaded=true, size_t grainSize=1)
 Reduce the memory footprint of a tree by replacing nodes whose values are all inactive with inactive tiles having a value equal to the first value encountered in the (inactive) child. More...
 
template<typename TreeT >
void pruneLevelSet (TreeT &tree, const typename TreeT::ValueType &outsideWidth, const typename TreeT::ValueType &insideWidth, bool threaded=true, size_t grainSize=1)
 Reduce the memory footprint of a tree by replacing nodes whose voxel values are all inactive with inactive tiles having the value -| insideWidth | if the voxel values are negative and | outsideWidth | otherwise. More...
 

Detailed Description

Defined various multi-threaded utility functions for trees.

Author
Ken Museth