11 #ifndef OPENVDB_TREE_NODEUNION_HAS_BEEN_INCLUDED
12 #define OPENVDB_TREE_NODEUNION_HAS_BEEN_INCLUDED
17 #include <type_traits>
30 template<
typename ValueT,
typename ChildT,
typename Enable =
void>
41 void setChild(ChildT* child) { mChild = child; }
43 const ValueT&
getValue()
const {
return mValue; }
54 "Unexpected instantiation of NodeUnion");
59 template<
typename ValueT,
typename ChildT>
61 typename std::enable_if<std::is_trivially_copyable<ValueT>::value>
::type>
64 union { ChildT* mChild; ValueT
mValue; };
70 void setChild(ChildT* child) { mChild = child; }
72 const ValueT&
getValue()
const {
return mValue; }
85 #endif // OPENVDB_TREE_NODEUNION_HAS_BEEN_INCLUDED
ChildT * getChild() const
void setChild(ChildT *child)
GLsizei const GLfloat * value
#define OPENVDB_USE_VERSION_NAMESPACE
void setValue(const ValueT &val)
void setValue(const ValueT &val)
void setChild(ChildT *child)
Default implementation of a NodeUnion that stores the child pointer and the value separately (i...
Library and file format version numbers.
ChildT * getChild() const
const ValueT & getValue() const
const ValueT & getValue() const
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.