HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType > Class Template Reference

Write-able version of AttributeHandle. More...

#include <AttributeArray.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >:

Public Types

using Handle = AttributeWriteHandle< ValueType, CodecType >
 
using Ptr = std::shared_ptr< Handle >
 
using ScopedPtr = std::unique_ptr< Handle >
 
- Public Types inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeHandle< ValueType, CodecType >
using Handle = AttributeHandle< ValueType, CodecType >
 
using Ptr = std::shared_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)
 
- Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeHandle< ValueType, CodecType >
 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
 

Static Public Member Functions

static Ptr create (AttributeArray &array, const bool expand=true)
 
- Static Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeHandle< ValueType, CodecType >
static Ptr create (const AttributeArray &array, const bool preserveCompression=true)
 

Friends

class ::TestAttributeArray
 

Additional Inherited Members

- Protected Types inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeHandle< ValueType, CodecType >
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 inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeHandle< ValueType, CodecType >
Index index (Index n, Index m) const
 
- Protected Attributes inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeHandle< ValueType, CodecType >
const AttributeArraymArray
 
GetterPtr mGetter
 
SetterPtr mSetter
 
ValuePtr mCollapser
 
ValuePtr mFiller
 

Detailed Description

template<typename ValueType, typename CodecType = UnknownCodec>
class openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >

Write-able version of AttributeHandle.

Definition at line 709 of file AttributeArray.h.

Member Typedef Documentation

template<typename ValueType, typename CodecType = UnknownCodec>
using openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::Handle = AttributeWriteHandle<ValueType, CodecType>

Definition at line 712 of file AttributeArray.h.

template<typename ValueType, typename CodecType = UnknownCodec>
using openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::Ptr = std::shared_ptr<Handle>

Definition at line 713 of file AttributeArray.h.

template<typename ValueType, typename CodecType = UnknownCodec>
using openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::ScopedPtr = std::unique_ptr<Handle>

Definition at line 714 of file AttributeArray.h.

Constructor & Destructor Documentation

template<typename ValueType , typename CodecType >
openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::AttributeWriteHandle ( AttributeArray array,
const bool  expand = true 
)

Definition at line 1964 of file AttributeArray.h.

template<typename ValueType, typename CodecType = UnknownCodec>
virtual openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::~AttributeWriteHandle ( )
virtualdefault

Member Function Documentation

template<typename ValueType , typename CodecType >
void openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::collapse ( )

Replace the existing array with a uniform value (zero if none provided).

Definition at line 1989 of file AttributeArray.h.

template<typename ValueType, typename CodecType >
void openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::collapse ( const ValueType &  uniformValue)

Definition at line 2001 of file AttributeArray.h.

template<typename ValueType , typename CodecType >
bool openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::compact ( )

Compact the existing array to become uniform if all values are identical.

Definition at line 1995 of file AttributeArray.h.

template<typename ValueType , typename CodecType >
AttributeWriteHandle< ValueType, CodecType >::Ptr openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::create ( AttributeArray array,
const bool  expand = true 
)
static

Definition at line 1957 of file AttributeArray.h.

template<typename ValueType , typename CodecType >
void openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::expand ( bool  fill = true)

If this array is uniform, replace it with an array of length size().

Parameters
fillif true, assign the uniform value to each element of the array.

Definition at line 1983 of file AttributeArray.h.

template<typename ValueType, typename CodecType >
void openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::fill ( const ValueType &  value)

Fill the existing array with the given value.

Note
Identical to collapse() except a non-uniform array will not become uniform.

Definition at line 2007 of file AttributeArray.h.

template<typename ValueType, typename CodecType >
void openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::set ( Index  n,
const ValueType &  value 
)

Definition at line 1971 of file AttributeArray.h.

template<typename ValueType, typename CodecType >
void openvdb::OPENVDB_VERSION_NAME::points::AttributeWriteHandle< ValueType, CodecType >::set ( Index  n,
Index  m,
const ValueType &  value 
)

Definition at line 1977 of file AttributeArray.h.

Friends And Related Function Documentation

template<typename ValueType, typename CodecType = UnknownCodec>
friend class ::TestAttributeArray
friend

Definition at line 741 of file AttributeArray.h.


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