HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle Class Reference

#include <AttributeArrayString.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle:

Public Types

using Ptr = std::shared_ptr< StringAttributeWriteHandle >
 
using UniquePtr = std::unique_ptr< StringAttributeWriteHandle >
 
- Public Types inherited from openvdb::OPENVDB_VERSION_NAME::points::StringAttributeHandle
using Ptr = std::shared_ptr< StringAttributeHandle >
 
using UniquePtr = std::unique_ptr< StringAttributeHandle >
 

Public Member Functions

 StringAttributeWriteHandle (AttributeArray &array, const MetaMap &metadata, const bool expand=true)
 
void expand (bool fill=true)
 If this array is uniform, replace it with an array of length size(). More...
 
void collapse ()
 Set membership for the whole array and attempt to collapse. More...
 
void collapse (const Name &name)
 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...
 
void fill (const Name &name)
 Fill the existing array with the given value. More...
 
void set (Index n, const Name &name)
 Set the value of the index to name. More...
 
void set (Index n, Index m, const Name &name)
 
void resetCache ()
 Reset the value cache from the metadata. More...
 
AttributeArrayarray ()
 Returns a reference to the array held in the Write Handle. More...
 
bool contains (const Name &name) const
 Returns whether or not the metadata cache contains a given value. More...
 
- Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::StringAttributeHandle
 StringAttributeHandle (const AttributeArray &array, const MetaMap &metadata, const bool preserveCompression=true)
 
Index stride () const
 
Index size () const
 
bool isUniform () const
 
bool hasConstantStride () const
 
Name get (Index n, Index m=0) const
 
void get (Name &name, Index n, Index m=0) const
 
const AttributeArrayarray () const
 Returns a reference to the array held in the Handle. More...
 

Static Public Member Functions

static Ptr create (AttributeArray &array, const MetaMap &metadata, const bool expand=true)
 
- Static Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::StringAttributeHandle
static Ptr create (const AttributeArray &array, const MetaMap &metadata, const bool preserveCompression=true)
 

Additional Inherited Members

- Protected Attributes inherited from openvdb::OPENVDB_VERSION_NAME::points::StringAttributeHandle
AttributeHandle< Index,
StringCodec< false > > 
mHandle
 
const MetaMapmMetadata
 

Detailed Description

Definition at line 186 of file AttributeArrayString.h.

Member Typedef Documentation

using openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::Ptr = std::shared_ptr<StringAttributeWriteHandle>

Definition at line 189 of file AttributeArrayString.h.

using openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::UniquePtr = std::unique_ptr<StringAttributeWriteHandle>

Definition at line 190 of file AttributeArrayString.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::StringAttributeWriteHandle ( AttributeArray array,
const MetaMap metadata,
const bool  expand = true 
)

Member Function Documentation

AttributeArray& openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::array ( )

Returns a reference to the array held in the Write Handle.

void openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::collapse ( )

Set membership for the whole array and attempt to collapse.

void openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::collapse ( const Name name)

Set membership for the whole array and attempt to collapse.

Parameters
nameName of the String
bool openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::compact ( )

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

bool openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::contains ( const Name name) const

Returns whether or not the metadata cache contains a given value.

Parameters
nameName of the String.
static Ptr openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::create ( AttributeArray array,
const MetaMap metadata,
const bool  expand = true 
)
static
void openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::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.
void openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::fill ( const Name name)

Fill the existing array with the given value.

Note
Identical to collapse() except a non-uniform array will not become uniform.
void openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::resetCache ( )

Reset the value cache from the metadata.

void openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::set ( Index  n,
const Name name 
)

Set the value of the index to name.

void openvdb::OPENVDB_VERSION_NAME::points::StringAttributeWriteHandle::set ( Index  n,
Index  m,
const Name name 
)

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