HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ > Class Template Referencefinal

Typed class for storing attribute data. More...

#include <AttributeArray.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >:

Public Types

using Ptr = std::shared_ptr< TypedAttributeArray >
 
using ConstPtr = std::shared_ptr< const TypedAttributeArray >
 
using ValueType = ValueType_
 
using Codec = Codec_
 
using StorageType = typename Codec::template Storage< ValueType >::Type
 
- Public Types inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeArray
enum  Flag {
  TRANSIENT = 0x1, HIDDEN = 0x2, CONSTANTSTRIDE = 0x8, STREAMING = 0x10,
  PARTIALREAD = 0x20
}
 
enum  SerializationFlag { WRITESTRIDED = 0x1, WRITEUNIFORM = 0x2, WRITEMEMCOMPRESS = 0x4, WRITEPAGED = 0x8 }
 
using Ptr = std::shared_ptr< AttributeArray >
 
using ConstPtr = std::shared_ptr< const AttributeArray >
 
using FactoryMethod = Ptr(*)(Index, Index, bool, const Metadata *)
 

Public Member Functions

 TypedAttributeArray (Index n=1, Index strideOrTotalSize=1, bool constantStride=true, const ValueType &uniformValue=zeroVal< ValueType >())
 Default constructor, always constructs a uniform attribute. More...
 
 TypedAttributeArray (const TypedAttributeArray &)
 
 TypedAttributeArray (const TypedAttributeArray &, bool)
 Deep copy constructor. More...
 
TypedAttributeArrayoperator= (const TypedAttributeArray &)
 
 TypedAttributeArray (TypedAttributeArray &&)=delete
 Move constructor disabled. More...
 
TypedAttributeArrayoperator= (TypedAttributeArray &&)=delete
 Move assignment operator disabled. More...
 
 ~TypedAttributeArray () override
 
AttributeArray::Ptr copy () const override
 
AttributeArray::Ptr copyUncompressed () const override
 
const NamePairtype () const override
 Return the name of this attribute's type. More...
 
Index size () const override
 Return the number of elements in this array. More...
 
Index stride () const override
 
Index dataSize () const override
 Return the size of the data in this array. More...
 
Name valueType () const override
 Return the name of the value type of a single element in this array (e.g., "float" or "vec3d"). More...
 
Name codecType () const override
 Return the name of the codec used by this array (e.g., "trnc" or "fxpt"). More...
 
Index valueTypeSize () const override
 Return the size in bytes of the value type of a single element in this array. More...
 
Index storageTypeSize () const override
 
bool valueTypeIsFloatingPoint () const override
 Return true if the value type is floating point. More...
 
bool valueTypeIsClass () const override
 Return true if the value type is a class (ie vector, matrix or quaternion return true) More...
 
bool valueTypeIsVector () const override
 Return true if the value type is a vector. More...
 
bool valueTypeIsQuaternion () const override
 Return true if the value type is a quaternion. More...
 
bool valueTypeIsMatrix () const override
 Return true if the value type is a matrix. More...
 
size_t memUsage () const override
 Return the number of bytes of memory used by this attribute. More...
 
ValueType getUnsafe (Index n) const
 Return the value at index n (assumes in-core) More...
 
ValueType get (Index n) const
 Return the value at index n. More...
 
template<typename T >
void getUnsafe (Index n, T &value) const
 Return the value at index n (assumes in-core) More...
 
template<typename T >
void get (Index n, T &value) const
 Return the value at index n. More...
 
void setUnsafe (Index n, const ValueType &value)
 Set value at the given index n (assumes in-core) More...
 
void set (Index n, const ValueType &value)
 Set value at the given index n. More...
 
template<typename T >
void setUnsafe (Index n, const T &value)
 Set value at the given index n (assumes in-core) More...
 
template<typename T >
void set (Index n, const T &value)
 Set value at the given index n. More...
 
void set (const Index n, const AttributeArray &sourceArray, const Index sourceIndex) override
 Set value at given index n from sourceIndex of another sourceArray. More...
 
bool isUniform () const override
 Return true if this array is stored as a single uniform value. More...
 
void expand (bool fill=true) override
 Replace the single value storage with an array of length size(). More...
 
void collapse () override
 Replace the existing array with a uniform zero value. More...
 
bool compact () override
 Compact the existing array to become uniform if all values are identical. More...
 
void collapse (const ValueType &uniformValue)
 Replace the existing array with the given uniform value. More...
 
void fill (const ValueType &value)
 Fill the existing array with the given value. More...
 
bool compress () override
 Compress the attribute array. More...
 
bool decompress () override
 Uncompress the attribute array. More...
 
void read (std::istream &) override
 Read attribute data from a stream. More...
 
void write (std::ostream &os, bool outputTransient) const override
 
void write (std::ostream &) const override
 Write attribute data to a stream, don't write transient attributes. More...
 
void readMetadata (std::istream &) override
 Read attribute metadata from a stream. More...
 
void writeMetadata (std::ostream &os, bool outputTransient, bool paged) const override
 
void readBuffers (std::istream &) override
 Read attribute buffers from a stream. More...
 
void writeBuffers (std::ostream &os, bool outputTransient) const override
 
void readPagedBuffers (compression::PagedInputStream &) override
 Read attribute buffers from a paged stream. More...
 
void writePagedBuffers (compression::PagedOutputStream &os, bool outputTransient) const override
 
bool isOutOfCore () const
 Return true if this buffer's values have not yet been read from disk. More...
 
void loadData () const override
 Ensures all data is in-core. More...
 
bool isDataLoaded () const override
 Return true if all data has been loaded. More...
 
- Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeArray
 AttributeArray ()
 
virtual ~AttributeArray ()
 
 AttributeArray (const AttributeArray &rhs)
 
AttributeArrayoperator= (const AttributeArray &rhs)
 
 AttributeArray (AttributeArray &&)=delete
 
AttributeArrayoperator= (AttributeArray &&)=delete
 
template<typename AttributeArrayType >
bool isType () const
 Return true if this attribute is of the same type as the template parameter. More...
 
template<typename ValueType >
bool hasValueType () const
 Return true if this attribute has a value type the same as the template parameter. More...
 
template<typename IterT >
void copyValuesUnsafe (const AttributeArray &sourceArray, const IterT &iter)
 Copy values into this array from a source array to a target array as referenced by an iterator. More...
 
template<typename IterT >
void copyValues (const AttributeArray &sourceArray, const IterT &iter, bool compact=true)
 Like copyValuesUnsafe(), but if compact is true, attempt to collapse this array. More...
 
void setHidden (bool state)
 Specify whether this attribute should be hidden (e.g., from UI or iterators). More...
 
bool isHidden () const
 Return true if this attribute is hidden (e.g., from UI or iterators). More...
 
void setTransient (bool state)
 Specify whether this attribute should only exist in memory and not be serialized during stream output. More...
 
bool isTransient () const
 Return true if this attribute is not serialized during stream output. More...
 
void setStreaming (bool state)
 Specify whether this attribute is to be streamed off disk, in which case, the attributes are collapsed after being first loaded leaving them in a destroyed state. More...
 
bool isStreaming () const
 Return true if this attribute is in streaming mode. More...
 
bool hasConstantStride () const
 Return true if this attribute has a constant stride. More...
 
uint8_t flags () const
 Retrieve the attribute array flags. More...
 
bool operator== (const AttributeArray &other) const
 
bool operator!= (const AttributeArray &other) const
 

Static Public Member Functions

static Ptr create (Index n, Index strideOrTotalSize=1, bool constantStride=true, const Metadata *metadata=nullptr)
 Return a new attribute array of the given length n and stride with uniform value zero. More...
 
static TypedAttributeArraycast (AttributeArray &attributeArray)
 Cast an AttributeArray to TypedAttributeArray<T> More...
 
static const TypedAttributeArraycast (const AttributeArray &attributeArray)
 Cast an AttributeArray to TypedAttributeArray<T> More...
 
static const NamePairattributeType ()
 Return the name of this attribute's type (includes codec) More...
 
static bool isRegistered ()
 Return true if this attribute type is registered. More...
 
static void registerType ()
 Register this attribute type along with a factory function. More...
 
static void unregisterType ()
 Remove this attribute type from the registry. More...
 
static ValueType getUnsafe (const AttributeArray *array, const Index n)
 
static void setUnsafe (AttributeArray *array, const Index n, const ValueType &value)
 
static void collapse (AttributeArray *array, const ValueType &value)
 Non-member equivalent to collapse() that static_casts array to this TypedAttributeArray. More...
 
static void fill (AttributeArray *array, const ValueType &value)
 Non-member equivalent to fill() that static_casts array to this TypedAttributeArray. More...
 
- Static Public Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeArray
static Ptr create (const NamePair &type, Index length, Index stride=1, bool constantStride=true, const Metadata *metadata=nullptr, const ScopedRegistryLock *lock=nullptr)
 
static bool isRegistered (const NamePair &type, const ScopedRegistryLock *lock=nullptr)
 Return true if the given attribute type name is registered. More...
 
static void clearRegistry (const ScopedRegistryLock *lock=nullptr)
 Clear the attribute type registry. More...
 

Protected Member Functions

AccessorBasePtr getAccessor () const override
 Obtain an Accessor that stores getter and setter functors. More...
 
StorageTypedata ()
 Return the raw data buffer. More...
 
const StorageTypedata () const
 
bool validData () const
 Verify that data is not out-of-core or in a partially-read state. More...
 
- Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeArray
 AttributeArray (const AttributeArray &rhs, const tbb::spin_mutex::scoped_lock &)
 
void setConstantStride (bool state)
 Specify whether this attribute has a constant stride or not. More...
 

Friends

class ::TestAttributeArray
 

Additional Inherited Members

- Protected Types inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeArray
using AccessorBasePtr = std::shared_ptr< AccessorBase >
 
- Static Protected Member Functions inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeArray
static void registerType (const NamePair &type, FactoryMethod, const ScopedRegistryLock *lock=nullptr)
 Register a attribute type along with a factory function. More...
 
static void unregisterType (const NamePair &type, const ScopedRegistryLock *lock=nullptr)
 Remove a attribute type from the registry. More...
 
- Protected Attributes inherited from openvdb::OPENVDB_VERSION_NAME::points::AttributeArray
bool mIsUniform = true
 
tbb::spin_mutex mMutex
 
uint8_t mFlags = 0
 
uint8_t mUsePagedRead = 0
 
std::atomic< Index32mOutOfCore
 
union {
   compression::PageHandle::Ptr   mPageHandle
 
   size_t   mCompressedBytes
 
}; 
 used for out-of-core, paged reading More...
 

Detailed Description

template<typename ValueType_, typename Codec_ = NullCodec>
class openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >

Typed class for storing attribute data.

Definition at line 544 of file AttributeArray.h.

Member Typedef Documentation

template<typename ValueType_, typename Codec_ = NullCodec>
using openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::Codec = Codec_

Definition at line 551 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
using openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::ConstPtr = std::shared_ptr<const TypedAttributeArray>

Definition at line 548 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
using openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::Ptr = std::shared_ptr<TypedAttributeArray>

Definition at line 547 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
using openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::StorageType = typename Codec::template Storage<ValueType>::Type

Definition at line 552 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
using openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::ValueType = ValueType_

Definition at line 550 of file AttributeArray.h.

Constructor & Destructor Documentation

template<typename ValueType_ , typename Codec_ >
openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::TypedAttributeArray ( Index  n = 1,
Index  strideOrTotalSize = 1,
bool  constantStride = true,
const ValueType uniformValue = zeroVal<ValueType>() 
)
explicit

Default constructor, always constructs a uniform attribute.

Definition at line 1129 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::TypedAttributeArray ( const TypedAttributeArray< ValueType_, Codec_ > &  rhs)

Deep copy constructor.

Note
This method is thread-safe (as of ABI=7) for concurrently reading from the source attribute array while being deep-copied. Specifically, this means that the attribute array being deep-copied can be out-of-core and safely loaded in one thread while being copied using this copy-constructor in another thread. It is not thread-safe for write.

Definition at line 1157 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::TypedAttributeArray ( const TypedAttributeArray< ValueType_, Codec_ > &  ,
bool   
)

Deep copy constructor.

template<typename ValueType_, typename Codec_ = NullCodec>
openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::TypedAttributeArray ( TypedAttributeArray< ValueType_, Codec_ > &&  )
delete

Move constructor disabled.

template<typename ValueType_, typename Codec_ = NullCodec>
openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::~TypedAttributeArray ( )
inlineoverride

Definition at line 581 of file AttributeArray.h.

Member Function Documentation

template<typename ValueType_ , typename Codec_ >
const NamePair & openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::attributeType ( )
inlinestatic

Return the name of this attribute's type (includes codec)

Definition at line 1206 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
TypedAttributeArray< ValueType_, Codec_ > & openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::cast ( AttributeArray attributeArray)
inlinestatic

Cast an AttributeArray to TypedAttributeArray<T>

Definition at line 1253 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
const TypedAttributeArray< ValueType_, Codec_ > & openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::cast ( const AttributeArray attributeArray)
inlinestatic

Cast an AttributeArray to TypedAttributeArray<T>

Definition at line 1263 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
Name openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::codecType ( ) const
inlineoverridevirtual

Return the name of the codec used by this array (e.g., "trnc" or "fxpt").

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 632 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::collapse ( )
overridevirtual

Replace the existing array with a uniform zero value.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1556 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::collapse ( const ValueType uniformValue)

Replace the existing array with the given uniform value.

Definition at line 1564 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::collapse ( AttributeArray array,
const ValueType value 
)
static

Non-member equivalent to collapse() that static_casts array to this TypedAttributeArray.

Definition at line 1578 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::compact ( )
overridevirtual

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

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1539 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::compress ( )
inlineoverridevirtual

Compress the attribute array.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1612 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
AttributeArray::Ptr openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::copy ( ) const
overridevirtual

Return a copy of this attribute.

Note
This method is thread-safe.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1273 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
AttributeArray::Ptr openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::copyUncompressed ( ) const
overridevirtual

Return a copy of this attribute.

Note
This method is thread-safe.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1282 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
TypedAttributeArray< ValueType_, Codec_ >::Ptr openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::create ( Index  n,
Index  strideOrTotalSize = 1,
bool  constantStride = true,
const Metadata metadata = nullptr 
)
inlinestatic

Return a new attribute array of the given length n and stride with uniform value zero.

Definition at line 1241 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
StorageType* openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::data ( )
inlineprotected

Return the raw data buffer.

Definition at line 779 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
const StorageType* openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::data ( ) const
inlineprotected

Definition at line 780 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
Index openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::dataSize ( ) const
inlineoverridevirtual

Return the size of the data in this array.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 624 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::decompress ( )
inlineoverridevirtual

Uncompress the attribute array.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1628 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::expand ( bool  fill = true)
overridevirtual

Replace the single value storage with an array of length size().

Note
Non-uniform attributes are unchanged.
Parameters
filltoggle to initialize the array elements with the pre-expanded value.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1518 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::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 1586 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::fill ( AttributeArray array,
const ValueType value 
)
static

Non-member equivalent to fill() that static_casts array to this TypedAttributeArray.

Definition at line 1603 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
TypedAttributeArray< ValueType_, Codec_ >::ValueType openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::get ( Index  n) const

Return the value at index n.

Definition at line 1413 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::get ( Index  n,
T &  value 
) const

Return the value at index n.

Definition at line 1434 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
AttributeArray::AccessorBasePtr openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::getAccessor ( ) const
overrideprotectedvirtual

Obtain an Accessor that stores getter and setter functors.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 2009 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
TypedAttributeArray< ValueType_, Codec_ >::ValueType openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::getUnsafe ( Index  n) const

Return the value at index n (assumes in-core)

Definition at line 1401 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::getUnsafe ( Index  n,
T &  value 
) const

Return the value at index n (assumes in-core)

Definition at line 1425 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
TypedAttributeArray< ValueType_, Codec_ >::ValueType openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::getUnsafe ( const AttributeArray array,
const Index  n 
)
static

Non-member equivalent to getUnsafe() that static_casts array to this TypedAttributeArray (assumes in-core)

Definition at line 1442 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::isDataLoaded ( ) const
overridevirtual

Return true if all data has been loaded.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1677 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::isOutOfCore ( ) const
inline

Return true if this buffer's values have not yet been read from disk.

Definition at line 1637 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::isRegistered ( )
inlinestatic

Return true if this attribute type is registered.

Definition at line 1217 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::isUniform ( ) const
inlineoverridevirtual

Return true if this array is stored as a single uniform value.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 700 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::loadData ( ) const
overridevirtual

Ensures all data is in-core.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1669 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
size_t openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::memUsage ( ) const
overridevirtual

Return the number of bytes of memory used by this attribute.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1384 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
TypedAttributeArray< ValueType_, Codec_ > & openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::operator= ( const TypedAttributeArray< ValueType_, Codec_ > &  rhs)

Deep copy assignment operator.

Note
this operator is thread-safe.

Definition at line 1179 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
TypedAttributeArray& openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::operator= ( TypedAttributeArray< ValueType_, Codec_ > &&  )
delete

Move assignment operator disabled.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::read ( std::istream &  is)
overridevirtual

Read attribute data from a stream.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1685 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::readBuffers ( std::istream &  is)
overridevirtual

Read attribute buffers from a stream.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1745 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::readMetadata ( std::istream &  is)
overridevirtual

Read attribute metadata from a stream.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1694 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::readPagedBuffers ( compression::PagedInputStream is)
overridevirtual

Read attribute buffers from a paged stream.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1784 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::registerType ( )
inlinestatic

Register this attribute type along with a factory function.

Definition at line 1225 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::set ( Index  n,
const ValueType value 
)

Set value at the given index n.

Definition at line 1465 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::set ( Index  n,
const T &  value 
)

Set value at the given index n.

Definition at line 1487 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::set ( const Index  n,
const AttributeArray sourceArray,
const Index  sourceIndex 
)
overridevirtual

Set value at given index n from sourceIndex of another sourceArray.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1504 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::setUnsafe ( Index  n,
const ValueType value 
)

Set value at the given index n (assumes in-core)

Definition at line 1450 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::setUnsafe ( Index  n,
const T &  value 
)

Set value at the given index n (assumes in-core)

Definition at line 1478 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::setUnsafe ( AttributeArray array,
const Index  n,
const ValueType value 
)
static

Non-member equivalent to setUnsafe() that static_casts array to this TypedAttributeArray (assumes in-core)

Definition at line 1495 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
Index openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::size ( void  ) const
inlineoverridevirtual

Return the number of elements in this array.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 617 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
Index openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::storageTypeSize ( ) const
inlineoverridevirtual

Return the size in bytes of the storage type of a single element of this array.

Note
If the Codec is a NullCodec, valueSize() == storageSize()

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 639 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
Index openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::stride ( ) const
inlineoverridevirtual

Return the stride of this array.

Note
A return value of zero means a variable stride

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 621 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
const NamePair& openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::type ( ) const
inlineoverridevirtual

Return the name of this attribute's type.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 607 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::unregisterType ( )
inlinestatic

Remove this attribute type from the registry.

Definition at line 1233 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::validData ( ) const
inlineprotected

Verify that data is not out-of-core or in a partially-read state.

Definition at line 783 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
Name openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::valueType ( ) const
inlineoverridevirtual

Return the name of the value type of a single element in this array (e.g., "float" or "vec3d").

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 629 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::valueTypeIsClass ( ) const
overridevirtual

Return true if the value type is a class (ie vector, matrix or quaternion return true)

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1349 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::valueTypeIsFloatingPoint ( ) const
overridevirtual

Return true if the value type is floating point.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1329 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::valueTypeIsMatrix ( ) const
overridevirtual

Return true if the value type is a matrix.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1375 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::valueTypeIsQuaternion ( ) const
overridevirtual

Return true if the value type is a quaternion.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1366 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
bool openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::valueTypeIsVector ( ) const
overridevirtual

Return true if the value type is a vector.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1358 of file AttributeArray.h.

template<typename ValueType_, typename Codec_ = NullCodec>
Index openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::valueTypeSize ( ) const
inlineoverridevirtual

Return the size in bytes of the value type of a single element in this array.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 635 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::write ( std::ostream &  os,
bool  outputTransient 
) const
overridevirtual

Write attribute data to a stream.

Parameters
osthe output stream
outputTransientif true, write out transient attributes

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1847 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::write ( std::ostream &  os) const
overridevirtual

Write attribute data to a stream, don't write transient attributes.

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1839 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::writeBuffers ( std::ostream &  os,
bool  outputTransient 
) const
overridevirtual

Write attribute buffers to a stream.

Parameters
osthe output stream
outputTransientif true, write out transient attributes

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1915 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::writeMetadata ( std::ostream &  os,
bool  outputTransient,
bool  paged 
) const
overridevirtual

Write attribute metadata to a stream.

Parameters
osthe output stream
outputTransientif true, write out transient attributes
pagedif true, data is written out in pages

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1856 of file AttributeArray.h.

template<typename ValueType_ , typename Codec_ >
void openvdb::OPENVDB_VERSION_NAME::points::TypedAttributeArray< ValueType_, Codec_ >::writePagedBuffers ( compression::PagedOutputStream os,
bool  outputTransient 
) const
overridevirtual

Write attribute buffers to a paged stream.

Parameters
osthe output stream
outputTransientif true, write out transient attributes

Implements openvdb::OPENVDB_VERSION_NAME::points::AttributeArray.

Definition at line 1957 of file AttributeArray.h.

Friends And Related Function Documentation

template<typename ValueType_, typename Codec_ = NullCodec>
friend class ::TestAttributeArray
friend

Definition at line 786 of file AttributeArray.h.


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