OpenVDB  5.2.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 preserveCompression=true)
 
 AttributeHandle (const AttributeHandle &)=default
 
AttributeHandleoperator= (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 AttributeArrayarray () const
 

Static Public Member Functions

static Ptr create (const AttributeArray &array, const bool preserveCompression=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 AttributeArraymArray
 
GetterPtr mGetter
 
SetterPtr mSetter
 
ValuePtr mCollapser
 
ValuePtr mFiller
 

Friends

class ::TestAttributeArray
 

Detailed Description

template<typename ValueType, typename CodecType = UnknownCodec>
class openvdb::v5_2::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  preserveCompression = 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  preserveCompression = 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: