HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Composite.h File Reference

Functions to efficiently perform various compositing operations on grids. More...

#include <openvdb/Platform.h>
#include <openvdb/Exceptions.h>
#include <openvdb/Types.h>
#include <openvdb/Grid.h>
#include <openvdb/math/Math.h>
#include "ValueTransformer.h"
#include "Prune.h"
#include "SignedFloodFill.h"
#include <hboost/utility/enable_if.hpp>
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
#include <tbb/parallel_reduce.h>
#include <tbb/task_group.h>
#include <tbb/task_scheduler_init.h>
+ Include dependency graph for Composite.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openvdb::OPENVDB_VERSION_NAME::tools::composite::BuildPrimarySegment< TreeType, Operation >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::composite::BuildSecondarySegment< TreeType, Operation >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::composite::GridOrTreeConstructor< TreeType >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::composite::GridOrTreeConstructor< Grid< TreeType > >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::CompReplaceOp< TreeT >
 
class  openvdb::OPENVDB_VERSION_NAME::tools::CsgVisitorBase< TreeType >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::CsgUnionVisitor< TreeType >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::CsgIntersectVisitor< TreeType >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::CsgDiffVisitor< TreeType >
 

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::tools
 
 openvdb::OPENVDB_VERSION_NAME::tools::composite
 

Enumerations

enum  openvdb::OPENVDB_VERSION_NAME::tools::composite::CSGOperation { openvdb::OPENVDB_VERSION_NAME::tools::composite::CSG_UNION, openvdb::OPENVDB_VERSION_NAME::tools::composite::CSG_INTERSECTION, openvdb::OPENVDB_VERSION_NAME::tools::composite::CSG_DIFFERENCE }
 

Functions

template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::csgUnion (GridOrTreeT &a, GridOrTreeT &b, bool prune=true)
 Given two level set grids, replace the A grid with the union of A and B. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::csgIntersection (GridOrTreeT &a, GridOrTreeT &b, bool prune=true)
 Given two level set grids, replace the A grid with the intersection of A and B. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::csgDifference (GridOrTreeT &a, GridOrTreeT &b, bool prune=true)
 Given two level set grids, replace the A grid with the difference A / B. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION
GridOrTreeT::Ptr 
openvdb::OPENVDB_VERSION_NAME::tools::csgUnionCopy (const GridOrTreeT &a, const GridOrTreeT &b)
 Threaded CSG union operation that produces a new grid or tree from immutable inputs. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION
GridOrTreeT::Ptr 
openvdb::OPENVDB_VERSION_NAME::tools::csgIntersectionCopy (const GridOrTreeT &a, const GridOrTreeT &b)
 Threaded CSG intersection operation that produces a new grid or tree from immutable inputs. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION
GridOrTreeT::Ptr 
openvdb::OPENVDB_VERSION_NAME::tools::csgDifferenceCopy (const GridOrTreeT &a, const GridOrTreeT &b)
 Threaded CSG difference operation that produces a new grid or tree from immutable inputs. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::compMax (GridOrTreeT &a, GridOrTreeT &b)
 Given grids A and B, compute max(a, b) per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::compMin (GridOrTreeT &a, GridOrTreeT &b)
 Given grids A and B, compute min(a, b) per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::compSum (GridOrTreeT &a, GridOrTreeT &b)
 Given grids A and B, compute a + b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::compMul (GridOrTreeT &a, GridOrTreeT &b)
 Given grids A and B, compute a * b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::compDiv (GridOrTreeT &a, GridOrTreeT &b)
 Given grids A and B, compute a / b per voxel (using sparse traversal). Store the result in the A grid and leave the B grid empty. More...
 
template<typename GridOrTreeT >
OPENVDB_STATIC_SPECIALIZATION void openvdb::OPENVDB_VERSION_NAME::tools::compReplace (GridOrTreeT &a, const GridOrTreeT &b)
 Copy the active voxels of B into A. More...
 
template<typename T >
const hboost::disable_if_c
< VecTraits< T >::IsVec, T >
::type
openvdb::OPENVDB_VERSION_NAME::tools::composite::min (const T &a, const T &b)
 
template<typename T >
const hboost::disable_if_c
< VecTraits< T >::IsVec, T >
::type
openvdb::OPENVDB_VERSION_NAME::tools::composite::max (const T &a, const T &b)
 
template<typename T >
const hboost::enable_if_c
< VecTraits< T >::IsVec, T >
::type
openvdb::OPENVDB_VERSION_NAME::tools::composite::min (const T &a, const T &b)
 
template<typename T >
const hboost::enable_if_c
< VecTraits< T >::IsVec, T >
::type
openvdb::OPENVDB_VERSION_NAME::tools::composite::max (const T &a, const T &b)
 
template<typename T >
hboost::disable_if
< hboost::is_integral< T >, T >
::type 
openvdb::OPENVDB_VERSION_NAME::tools::composite::divide (const T &a, const T &b)
 
template<typename T >
hboost::enable_if
< hboost::is_integral< T >, T >
::type 
openvdb::OPENVDB_VERSION_NAME::tools::composite::divide (const T &a, const T &b)
 
bool openvdb::OPENVDB_VERSION_NAME::tools::composite::divide (bool a, bool)
 
template<CSGOperation Operation, typename TreeType >
TreeType::Ptr openvdb::OPENVDB_VERSION_NAME::tools::composite::doCSGCopy (const TreeType &lhs, const TreeType &rhs)
 

Detailed Description

Functions to efficiently perform various compositing operations on grids.

Authors
Peter Cucka, Mihai Alden

Definition in file Composite.h.