OpenVDB  6.1.0
Public Types | Public Member Functions | Protected Attributes | List of all members
GroupWriteHandle Class Reference

#include <AttributeGroup.h>

Inherits GroupHandle.

Public Types

using Ptr = std::shared_ptr< GroupWriteHandle >
 
using GroupIndex = std::pair< Index, uint8_t >
 

Public Member Functions

 GroupWriteHandle (GroupAttributeArray &array, const GroupType &offset)
 
void set (Index n, bool on)
 
bool collapse (bool on)
 Set membership for the whole array and attempt to collapse. More...
 
bool compact ()
 Compact the existing array to become uniform if all values are identical. More...
 
Index size () const
 
bool isUniform () const
 
bool get (Index n) const
 
bool getUnsafe (Index n) const
 

Protected Attributes

const GroupAttributeArraymArray
 
const GroupType mBitMask
 

Member Typedef Documentation

using GroupIndex = std::pair<Index, uint8_t>
inherited
using Ptr = std::shared_ptr<GroupWriteHandle>

Constructor & Destructor Documentation

GroupWriteHandle ( GroupAttributeArray array,
const GroupType offset 
)

Member Function Documentation

bool collapse ( bool  on)

Set membership for the whole array and attempt to collapse.

Parameters
onTrue or false for inclusion in group
Note
This method guarantees that all attributes will have group membership changed according to the input bool, however compaction will not be performed if other groups that share the same underlying array are non-uniform. The return value indicates if the group array ends up being uniform.
bool compact ( )

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

bool get ( Index  n) const
inherited
bool getUnsafe ( Index  n) const
inherited
bool isUniform ( ) const
inlineinherited
void set ( Index  n,
bool  on 
)
Index size ( ) const
inlineinherited

Member Data Documentation

const GroupAttributeArray& mArray
protectedinherited
const GroupType mBitMask
protectedinherited

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