OpenVDB: AttributeHandle< ValueType, CodecType > Class Template Reference

OpenVDB 6.1.0

Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
AttributeHandle< ValueType, CodecType > Class Template Reference

`#include <AttributeArray.h>`

Inherited by AttributeWriteHandle< ValueType, CodecType >.

## Public Types
using | Handle = AttributeHandle< ValueType, CodecType >
using | Ptr = std::shared_ptr< Handle >
using | UniquePtr = std::unique_ptr< Handle >

## Public Member Functions
| AttributeHandle (const AttributeArray &array, const bool collapseOnDestruction=true)
| AttributeHandle (const AttributeHandle &)=default
AttributeHandle & | operator= (const AttributeHandle &)=default
virtual | ~AttributeHandle ()
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 (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

## Detailed Description

### template<typename ValueType, typename CodecType = UnknownCodec>
class openvdb::v6_1::points::AttributeHandle< ValueType, CodecType >

AttributeHandles provide access to specific TypedAttributeArray methods without needing to know the compression codec, however these methods also incur the cost of a function pointer

## Member Typedef Documentation

## ◆ GetterPtr

using GetterPtr = ValueType (*)(const AttributeArray* array, const Index n)
| protected

## ◆ Handle

using Handle = AttributeHandle<ValueType, CodecType>

## ◆ Ptr

using Ptr = std::shared_ptr<Handle>

## ◆ SetterPtr

using SetterPtr = void (*)(AttributeArray* array, const Index n, const ValueType& value)
| protected

## ◆ UniquePtr

using UniquePtr = std::unique_ptr<Handle>

## ◆ ValuePtr

using ValuePtr = void (*)(AttributeArray* array, const ValueType& value)
| protected

## Constructor & Destructor Documentation

## ◆ AttributeHandle() [1/2]

AttributeHandle | ( | const AttributeArray & | array,
|  | const bool | collapseOnDestruction = `true`
| ) |  |

## ◆ AttributeHandle() [2/2]

AttributeHandle | ( | const AttributeHandle< ValueType, CodecType > & |  | ) |
| default

## ◆ ~AttributeHandle()

~AttributeHandle | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ array()

const AttributeArray & array | ( |  | ) | const

## ◆ create()

AttributeHandle< ValueType, CodecType >::Ptr create | ( | const AttributeArray & | array,
|  | const bool | collapseOnDestruction = `true`
| ) |  |
| static

## ◆ get()

ValueType get | ( | Index | n,
|  | Index | m = `0`
| ) |  | const

## ◆ hasConstantStride()

bool hasConstantStride | ( |  | ) | const

## ◆ index()

Index index | ( | Index | n,
|  | Index | m
| ) |  | const
| protected

## ◆ isUniform()

bool isUniform | ( |  | ) | const

## ◆ operator=()

AttributeHandle& operator= | ( | const AttributeHandle< ValueType, CodecType > & |  | ) |
| default

## ◆ size()

Index size | ( |  | ) | const
| inline

## ◆ stride()

Index stride | ( |  | ) | const
| inline

## Friends And Related Function Documentation

## ◆ ::TestAttributeArray

friend class ::TestAttributeArray
| friend

## Member Data Documentation

## ◆ mArray

const AttributeArray* mArray
| protected

## ◆ mCollapser

ValuePtr mCollapser
| protected

## ◆ mFiller

ValuePtr mFiller
| protected

## ◆ mGetter

GetterPtr mGetter
| protected

## ◆ mSetter

SetterPtr mSetter
| protected

The documentation for this class was generated from the following file:

- AttributeArray.h