OpenVDB  2.0.0
Classes | Namespaces
NodeUnion.h File Reference
#include <boost/type_traits/is_class.hpp>
#include <openvdb/version.h>

Go to the source code of this file.

Classes

class  NodeUnionImpl< ValueIsClass, ValueT, ChildT >
 
class  NodeUnionImpl< false, ValueT, ChildT >
 
class  NodeUnionImpl< true, ValueT, ChildT >
 
struct  NodeUnion< ValueT, ChildT >
 

Namespaces

 openvdb
 
 openvdb::v2_0_0
 
 openvdb::v2_0_0::tree
 

Detailed Description

Author
Peter Cucka

NodeUnion is a templated helper class that controls access to either the child node pointer or the value for a particular element of a root or internal node. For space efficiency, the child pointer and the value are unioned, since the two are never in use simultaneously. Template specializations of NodeUnion allow for values of either POD (int, float, pointer, etc.) or class (std::string, math::Vec, etc.) types. (The latter cannot be stored directly in a union.)