OpenVDB 11.0.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
AttributeWriteHandle< ValueType, CodecType > Class Template Reference

Write-able version of AttributeHandle. More...

`#include <openvdb/points/AttributeArray.h>`

Inheritance diagram for AttributeWriteHandle< 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().
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.
void | fill (const ValueType &value)
| Fill the existing array with the given value.
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

## Detailed Description

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

Write-able version of AttributeHandle.

## Member Typedef Documentation

## ◆ GetterPtr

template<typename ValueType , typename CodecType = UnknownCodec>

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

## ◆ Handle

template<typename ValueType , typename CodecType = UnknownCodec>

using Handle = AttributeWriteHandle<ValueType, CodecType>

## ◆ Ptr

template<typename ValueType , typename CodecType = UnknownCodec>

using Ptr = std::shared_ptr<Handle>

## ◆ ScopedPtr

template<typename ValueType , typename CodecType = UnknownCodec>

using ScopedPtr = std::unique_ptr<Handle>

## ◆ SetterPtr

template<typename ValueType , typename CodecType = UnknownCodec>

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

## ◆ UniquePtr

template<typename ValueType , typename CodecType = UnknownCodec>

using UniquePtr = std::unique_ptr<Handle>
| inherited

## ◆ ValuePtr

template<typename ValueType , typename CodecType = UnknownCodec>

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

## Constructor & Destructor Documentation

## ◆ AttributeWriteHandle()

template<typename ValueType , typename CodecType >

AttributeWriteHandle | ( | AttributeArray & | array,
|  | const bool | expand = `true`
| ) |  |

## ◆ ~AttributeWriteHandle()

template<typename ValueType , typename CodecType = UnknownCodec>

virtual ~AttributeWriteHandle | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ array() [1/2]

template<typename ValueType , typename CodecType >

AttributeArray & array | ( |  | ) |

## ◆ array() [2/2]

template<typename ValueType , typename CodecType >

const AttributeArray & array | ( |  | ) | const
| inherited

## ◆ collapse() [1/2]

template<typename ValueType , typename CodecType >

void collapse | ( |  | ) |

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

## ◆ collapse() [2/2]

template<typename ValueType , typename CodecType >

void collapse | ( | const ValueType & | uniformValue | ) |

## ◆ compact()

template<typename ValueType , typename CodecType >

bool compact | ( |  | ) |

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

## ◆ create() [1/2]

template<typename ValueType , typename CodecType >

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

## ◆ create() [2/2]

template<typename ValueType , typename CodecType >

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

## ◆ expand()

template<typename ValueType , typename CodecType >

void expand | ( | bool | fill = `true` | ) |

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

Parameters

  fill | if true, assign the uniform value to each element of the array.

## ◆ fill()

template<typename ValueType , typename CodecType >

void 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.

## ◆ get()

template<typename ValueType , typename CodecType >

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

## ◆ hasConstantStride()

template<typename ValueType , typename CodecType >

bool hasConstantStride | ( |  | ) | const
| inherited

## ◆ index()

template<typename ValueType , typename CodecType >

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

## ◆ isUniform()

template<typename ValueType , typename CodecType >

bool isUniform | ( |  | ) | const
| inherited

## ◆ set() [1/2]

template<typename ValueType , typename CodecType >

void set | ( | Index | n,
|  | const ValueType & | value
| ) |  |

## ◆ set() [2/2]

template<typename ValueType , typename CodecType >

void set | ( | Index | n,
|  | Index | m,
|  | const ValueType & | value
| ) |  |

## ◆ size()

template<typename ValueType , typename CodecType = UnknownCodec>

Index size | ( |  | ) | const
| inline inherited

## ◆ stride()

template<typename ValueType , typename CodecType = UnknownCodec>

Index stride | ( |  | ) | const
| inline inherited

## Friends And Related Symbol Documentation

## ◆ ::TestAttributeArray

template<typename ValueType , typename CodecType = UnknownCodec>

friend class ::TestAttributeArray
| friend

## Member Data Documentation

## ◆ mArray

template<typename ValueType , typename CodecType = UnknownCodec>

const AttributeArray* mArray
| protected inherited

## ◆ mCollapser

template<typename ValueType , typename CodecType = UnknownCodec>

ValuePtr mCollapser
| protected inherited

## ◆ mFiller

template<typename ValueType , typename CodecType = UnknownCodec>

ValuePtr mFiller
| protected inherited

## ◆ mGetter

template<typename ValueType , typename CodecType = UnknownCodec>

GetterPtr mGetter
| protected inherited

## ◆ mSetter

template<typename ValueType , typename CodecType = UnknownCodec>

SetterPtr mSetter
| protected inherited