HDK
|
Array of fixed size 23Log2Dim that stores the voxel values of a LeafNode. More...
#include <LeafBuffer.h>
Public Types | |
using | ValueType = T |
using | StorageType = ValueType |
using | NodeMaskType = util::NodeMask< Log2Dim > |
Public Member Functions | |
LeafBuffer () | |
Default constructor. More... | |
LeafBuffer (const ValueType &) | |
Construct a buffer populated with the specified value. More... | |
LeafBuffer (const LeafBuffer &) | |
Copy constructor. More... | |
LeafBuffer (PartialCreate, const ValueType &) | |
Construct a buffer but don't allocate memory for the full array of values. More... | |
~LeafBuffer () | |
Destructor. More... | |
bool | isOutOfCore () const |
Return true if this buffer's values have not yet been read from disk. More... | |
bool | empty () const |
Return true if memory for this buffer has not yet been allocated. More... | |
bool | allocate () |
Allocate memory for this buffer if it has not already been allocated. More... | |
void | fill (const ValueType &) |
Populate this buffer with a constant value. More... | |
const ValueType & | getValue (Index i) const |
Return a const reference to the i'th element of this buffer. More... | |
const ValueType & | operator[] (Index i) const |
Return a const reference to the i'th element of this buffer. More... | |
void | setValue (Index i, const ValueType &) |
Set the i'th value of this buffer to the specified value. More... | |
LeafBuffer & | operator= (const LeafBuffer &) |
Copy the other buffer's values into this buffer. More... | |
bool | operator== (const LeafBuffer &) const |
Return true if the contents of the other buffer exactly equal the contents of this buffer. More... | |
bool | operator!= (const LeafBuffer &other) const |
Return true if the contents of the other buffer are not exactly equal to the contents of this buffer. More... | |
void | swap (LeafBuffer &) |
Exchange this buffer's values with the other buffer's values. More... | |
Index | memUsage () const |
Return the memory footprint of this buffer in bytes. More... | |
Index | memUsageIfLoaded () const |
const ValueType * | data () const |
Return a const pointer to the array of voxel values. More... | |
ValueType * | data () |
Return a pointer to the array of voxel values. More... | |
Static Public Member Functions | |
static Index | size () |
Return the number of values contained in this buffer. More... | |
Static Public Attributes | |
static const Index | SIZE = 1 << 3 * Log2Dim |
Friends | |
class | ::TestLeaf |
template<typename , Index > | |
class | LeafNode |
Array of fixed size 23Log2Dim that stores the voxel values of a LeafNode.
Definition at line 30 of file LeafBuffer.h.
using openvdb::OPENVDB_VERSION_NAME::tree::LeafBuffer< T, Log2Dim >::NodeMaskType = util::NodeMask<Log2Dim> |
Definition at line 35 of file LeafBuffer.h.
using openvdb::OPENVDB_VERSION_NAME::tree::LeafBuffer< T, Log2Dim >::StorageType = ValueType |
Definition at line 34 of file LeafBuffer.h.
using openvdb::OPENVDB_VERSION_NAME::tree::LeafBuffer< T, Log2Dim >::ValueType = T |
Definition at line 33 of file LeafBuffer.h.
|
inline |
Default constructor.
Definition at line 50 of file LeafBuffer.h.
|
inlineexplicit |
Construct a buffer populated with the specified value.
Definition at line 178 of file LeafBuffer.h.
|
inline |
Copy constructor.
Definition at line 206 of file LeafBuffer.h.
|
inline |
Construct a buffer but don't allocate memory for the full array of values.
Definition at line 61 of file LeafBuffer.h.
|
inline |
Destructor.
Definition at line 190 of file LeafBuffer.h.
|
inline |
Allocate memory for this buffer if it has not already been allocated.
Definition at line 82 of file LeafBuffer.h.
|
inline |
Return a const pointer to the array of voxel values.
This method guarantees that the buffer is allocated and loaded.
Definition at line 346 of file LeafBuffer.h.
|
inline |
Return a pointer to the array of voxel values.
This method guarantees that the buffer is allocated and loaded.
Definition at line 362 of file LeafBuffer.h.
|
inline |
Return true
if memory for this buffer has not yet been allocated.
Definition at line 80 of file LeafBuffer.h.
|
inline |
Populate this buffer with a constant value.
Definition at line 274 of file LeafBuffer.h.
|
inline |
Return a const reference to the i'th element of this buffer.
Definition at line 88 of file LeafBuffer.h.
|
inline |
Return true
if this buffer's values have not yet been read from disk.
Definition at line 71 of file LeafBuffer.h.
|
inline |
Return the memory footprint of this buffer in bytes.
Definition at line 319 of file LeafBuffer.h.
|
inline |
Definition at line 336 of file LeafBuffer.h.
|
inline |
Return true
if the contents of the other buffer are not exactly equal to the contents of this buffer.
Definition at line 102 of file LeafBuffer.h.
|
inline |
Copy the other buffer's values into this buffer.
Definition at line 242 of file LeafBuffer.h.
|
inline |
Return true
if the contents of the other buffer exactly equal the contents of this buffer.
Definition at line 287 of file LeafBuffer.h.
|
inline |
Return a const reference to the i'th element of this buffer.
Definition at line 90 of file LeafBuffer.h.
|
inline |
Set the i'th value of this buffer to the specified value.
Definition at line 232 of file LeafBuffer.h.
|
inlinestatic |
Return the number of values contained in this buffer.
Definition at line 111 of file LeafBuffer.h.
|
inline |
Exchange this buffer's values with the other buffer's values.
Definition at line 302 of file LeafBuffer.h.
|
friend |
Definition at line 167 of file LeafBuffer.h.
Definition at line 169 of file LeafBuffer.h.
|
static |
Definition at line 36 of file LeafBuffer.h.