HDK
|
Attribute Interface for accessing generic blob data. More...
#include <GA_AIFBlob.h>
Classes | |
class | BlobBuffer |
Class which holds temporary references to blobs. More... | |
Public Member Functions | |
GA_AIFBlob () | |
virtual | ~GA_AIFBlob () |
virtual int | getTupleSize (const GA_Attribute *attrib) const =0 |
Return the number of blobs per element. More... | |
virtual bool | setTupleSize (GA_Attribute *attrib, int size) const =0 |
Set the tuple size. More... | |
virtual GA_Size | getBlobCount (const GA_Attribute *attrib) const =0 |
Return the total number of unique blobs stored in the attribute. More... | |
virtual GA_BlobRef | lookupBlob (const GA_Attribute *attrib, GA_BlobIndex handle) const =0 |
Given a blob integer identifier, return a handle to the actual blob data. More... | |
virtual GA_BlobRef | lookupOrderedBlob (const GA_Attribute *attrib, exint index) const =0 |
virtual GA_BlobIndex | getBlobIndex (const GA_Attribute *atr, GA_Offset offset, int tuple_index=0) const =0 |
virtual GA_BlobRef | getBlob (const GA_Attribute *attrib, GA_Offset offset, int tuple_index=0) const =0 |
Get the blob data associated with the tuple index of the given element. More... | |
virtual bool | setBlob (GA_Attribute *attrib, const GA_BlobRef &blob, GA_Offset offset, int tuple_index=0) const =0 |
Store a blob on the given element. More... | |
virtual bool | replaceBlob (GA_Attribute *attrib, GA_BlobIndex handle, const GA_BlobRef &new_blob) const =0 |
virtual void | compactStorage (GA_Attribute *attrib) const =0 |
Compact the storage by removing empty indexes. More... | |
virtual bool | arrayReserve (GA_Attribute *attrib, int length) const |
Reserve space for an array of the given size. More... | |
virtual bool | arrayTruncate (GA_Attribute *attrib, int length) const |
Truncate the array to the given entries. More... | |
virtual int | arrayTrim (GA_Attribute *attrib) const |
virtual int | arrayAppendBlob (GA_Attribute *attrib, const GA_BlobRef &blob, GA_Offset element_index=GA_Offset(0)) const |
Append an element to the end of the array for the given element. More... | |
virtual int | arrayAppendUniqueBlob (GA_Attribute *attrib, const GA_BlobRef &blob, GA_Offset element_index=GA_Offset(0)) const |
virtual int | arrayAppendBlobIndex (GA_Attribute *attrib, GA_BlobIndex handle, GA_Offset element_index=GA_Offset(0)) const |
Append an element to the end of the array for the given element. More... | |
virtual int | arrayAppendUniqueBlobIndex (GA_Attribute *attrib, GA_BlobIndex handle, GA_Offset element_index=GA_Offset(0)) const |
virtual int | arrayGetLength (const GA_Attribute *attrib, GA_Offset element_index=GA_Offset(0)) const |
virtual int | arrayGetMaxLength (const GA_Attribute *attrib, const GA_Range &range) const |
Return the maximum length of all elements in the range. More... | |
virtual GA_BlobIndex | arrayGetBlobIndex (const GA_Attribute *attrib, int array_index, GA_Offset element_index=GA_Offset(0)) const |
Return the blob handle for the item at the given array index. More... | |
virtual GA_BlobRef | arrayGetBlob (const GA_Attribute *attrib, int array_index, GA_Offset element_index=GA_Offset(0)) const |
Return the blob for the item at the given array index. More... | |
virtual int | arrayGetBlobs (GA_BlobRefList &list, const GA_Attribute *attrib, GA_Offset element_index=GA_Offset(0)) const |
virtual int | arrayFindBlob (const GA_Attribute *attrib, const GA_BlobRef &blob, GA_Offset element_index=GA_Offset(0)) const |
virtual bool | arrayDestroyBlob (GA_Attribute *attrib, int array_index, GA_Offset element_index=GA_Offset(0)) const |
virtual int | arrayRemoveDuplicates (GA_Attribute *attrib, GA_Offset element_index=GA_Offset(0)) const |
Protected Member Functions | |
virtual GA_BlobIndex | addBlobReference (GA_Attribute *attrib, const GA_BlobRef &blob) const =0 |
virtual void | delBlobReference (GA_Attribute *attrib, GA_BlobIndex handle) const =0 |
Friends | |
class | BlobBuffer |
Attribute Interface for accessing generic blob data.
This attribute interface allows access to blob data on an attribute. This is provided automatically if you inherit from GA_ATIBlob.
Definition at line 39 of file GA_AIFBlob.h.
GA_AIFBlob::GA_AIFBlob | ( | ) |
|
virtual |
|
protectedpure virtual |
Methods used by the BlobBuffer methods to add an unreferenced blob to the attribute.
|
virtual |
Append an element to the end of the array for the given element.
|
inlinevirtual |
Append an element to the end of the array for the given element.
Definition at line 194 of file GA_AIFBlob.h.
|
virtual |
Append an element to the array, but only if the element is unique in the array.
|
inlinevirtual |
Append an element to the array, but only if the element is unique in the array.
Definition at line 205 of file GA_AIFBlob.h.
|
virtual |
Delete a blob from the index. This will shift occupied blobs after the deleted blob so that the tuple contains a contiguous array of occupied tuple indices.
|
virtual |
Find a blob in the array, returning its index. Returns -1 if the blob isn't found.
|
inlinevirtual |
Return the blob for the item at the given array index.
Definition at line 233 of file GA_AIFBlob.h.
|
inlinevirtual |
Return the blob handle for the item at the given array index.
Definition at line 225 of file GA_AIFBlob.h.
|
virtual |
|
virtual |
Return the length of occupied blobs in the array. This is primarily useful for global attributes.
|
virtual |
Return the maximum length of all elements in the range.
|
virtual |
Remove duplicate blobs from the array The element_index
specifies the point, primitive, vertex etc.
|
inlinevirtual |
Reserve space for an array of the given size.
The Array API. This API allows the attribute to store an "array" on each data element. This is done by changing the tuple size to match the array length. Each tuple, therefore, represents an array. The length is determined by the occupied entries in the tuple.
These methods can all be implemented using the other API functions. However, they provide a simpler interface.
Definition at line 162 of file GA_AIFBlob.h.
|
virtual |
Trim the array to the minimum required size. This may be an expensive operation as it traverses all elements to compute the minimum size, then calls truncate. The method returns the new size.
|
inlinevirtual |
Truncate the array to the given entries.
Definition at line 170 of file GA_AIFBlob.h.
|
pure virtual |
Compact the storage by removing empty indexes.
|
protectedpure virtual |
|
pure virtual |
Get the blob data associated with the tuple index of the given element.
|
pure virtual |
Return the total number of unique blobs stored in the attribute.
|
pure virtual |
Get the integer identifier for the blob associated with the tuple index of the given element. An element with no blob data will have an index less than 0.
|
pure virtual |
Return the number of blobs per element.
|
pure virtual |
Given a blob integer identifier, return a handle to the actual blob data.
|
pure virtual |
Blob handles (GA_BlobIndex) may not be contiguous. This may be an expensive operation.
|
pure virtual |
Replace the value of the blob at the given index with a new value. Implementors should be careful to check whether the new_blob
exists (i.e. renaming an existing blob to another existing blob). All blobs which reference the original handle will now reference the new blob.
|
pure virtual |
Store a blob on the given element.
|
pure virtual |
Set the tuple size.
|
friend |
Definition at line 266 of file GA_AIFBlob.h.