OpenVDB
9.0.1
|
Write-able version of AttributeHandle. More...
#include <openvdb/points/AttributeArray.h>
Inherits AttributeHandle< ValueType, CodecType >.
Public Types | |
using | Handle = AttributeWriteHandle< ValueType, CodecType > |
using | Ptr = std::shared_ptr< Handle > |
using | ScopedPtr = std::unique_ptr< Handle > |
using | UniquePtr = std::unique_ptr< Handle > |
Public Member Functions | |
AttributeWriteHandle (AttributeArray &array, const bool expand=true) | |
virtual | ~AttributeWriteHandle ()=default |
void | expand (bool fill=true) |
If this array is uniform, replace it with an array of length size(). More... | |
void | collapse () |
Replace the existing array with a uniform value (zero if none provided). More... | |
void | collapse (const ValueType &uniformValue) |
bool | compact () |
Compact the existing array to become uniform if all values are identical. More... | |
void | fill (const ValueType &value) |
Fill the existing array with the given value. More... | |
void | set (Index n, const ValueType &value) |
void | set (Index n, Index m, const ValueType &value) |
AttributeArray & | array () |
Index | stride () const |
Index | size () const |
bool | isUniform () const |
bool | hasConstantStride () const |
ValueType | get (Index n, Index m=0) const |
const AttributeArray & | array () const |
Static Public Member Functions | |
static Ptr | create (AttributeArray &array, const bool expand=true) |
static Ptr | create (const AttributeArray &array, const bool collapseOnDestruction=true) |
Protected Types | |
using | GetterPtr = ValueType(*)(const AttributeArray *array, const Index n) |
using | SetterPtr = void(*)(AttributeArray *array, const Index n, const ValueType &value) |
using | ValuePtr = void(*)(AttributeArray *array, const ValueType &value) |
Protected Member Functions | |
Index | index (Index n, Index m) const |
Protected Attributes | |
const AttributeArray * | mArray |
GetterPtr | mGetter |
SetterPtr | mSetter |
ValuePtr | mCollapser |
ValuePtr | mFiller |
Friends | |
class | ::TestAttributeArray |
Write-able version of AttributeHandle.
|
protectedinherited |
using Handle = AttributeWriteHandle<ValueType, CodecType> |
|
protectedinherited |
|
protectedinherited |
AttributeWriteHandle | ( | AttributeArray & | array, |
const bool | expand = true |
||
) |
|
virtualdefault |
|
inherited |
AttributeArray & array | ( | ) |
void collapse | ( | ) |
Replace the existing array with a uniform value (zero if none provided).
void collapse | ( | const ValueType & | uniformValue | ) |
bool compact | ( | ) |
Compact the existing array to become uniform if all values are identical.
|
staticinherited |
|
static |
void expand | ( | bool | fill = true | ) |
If this array is uniform, replace it with an array of length size().
fill | if true, assign the uniform value to each element of the array. |
void fill | ( | const ValueType & | value | ) |
Fill the existing array with the given value.
|
inherited |
|
inherited |
void set | ( | Index | n, |
const ValueType & | value | ||
) |
|
inlineinherited |
|
inlineinherited |
|
friend |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |