OpenVDB: openvdb/tree/NodeUnion.h File Reference

OpenVDB 10.1.0

Loading...
Searching...
No Matches
Classes | Namespaces
NodeUnion.h File Reference
`#include <openvdb/version.h>`
`#include <openvdb/Types.h>`
`#include <cstring>`
`#include <type_traits>`

Go to the source code of this file.

## Classes
class | NodeUnion< ValueT, ChildT, Enable >
| Default implementation of a NodeUnion that stores the child pointer and the value separately (i.e., not in a union). Types which select this specialization usually do not conform to the requirements of a union member, that is that the type ValueT is not trivially copyable. This implementation is thus NOT used for POD, math::Vec, math::Mat, math::Quat or math::Coord types, but is used (for example) with std::string. More...
class | NodeUnion< ValueT, ChildT, typename std::enable_if< std::is_trivially_copyable< ValueT >::value >::type >
| Template specialization of a NodeUnion that stores the child pointer and the value together (int, float, pointer, etc.) More...

## Namespaces
namespace | openvdb
namespace | openvdb::v10_1
namespace | openvdb::v10_1::tree

## Detailed Description

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 when possible, since the two are never in use simultaneously.