OpenVDB  9.0.1
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 <openvdb/points/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
 
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 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 AttributeArraymArray
 
GetterPtr mGetter
 
SetterPtr mSetter
 
ValuePtr mCollapser
 
ValuePtr mFiller
 

Friends

class ::TestAttributeArray
 

Detailed Description

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

using GetterPtr = ValueType (*)(const AttributeArray* array, const Index n)
protected
using Handle = AttributeHandle<ValueType, CodecType>
using Ptr = std::shared_ptr<Handle>
using SetterPtr = void (*)(AttributeArray* array, const Index n, const ValueType& value)
protected
using UniquePtr = std::unique_ptr<Handle>
using ValuePtr = void (*)(AttributeArray* array, const ValueType& value)
protected

Constructor & Destructor Documentation

AttributeHandle ( const AttributeArray array,
const bool  collapseOnDestruction = true 
)
AttributeHandle ( const AttributeHandle< ValueType, CodecType > &  )
default
~AttributeHandle ( )
virtual

Member Function Documentation

const AttributeArray & array ( ) const
AttributeHandle< ValueType, CodecType >::Ptr create ( const AttributeArray array,
const bool  collapseOnDestruction = true 
)
static
ValueType get ( Index  n,
Index  m = 0 
) const
bool hasConstantStride ( ) const
Index index ( Index  n,
Index  m 
) const
protected
bool isUniform ( ) const
AttributeHandle& operator= ( const AttributeHandle< ValueType, CodecType > &  )
default
Index size ( ) const
inline
Index stride ( ) const
inline

Friends And Related Function Documentation

friend class ::TestAttributeArray
friend

Member Data Documentation

const AttributeArray* mArray
protected
ValuePtr mCollapser
protected
ValuePtr mFiller
protected
GetterPtr mGetter
protected
SetterPtr mSetter
protected