HDK
|
#include <GA_ATINumeric.h>
Public Types | |
typedef GA_PageArray< void,-1, true, false > | DataType |
Public Types inherited from GA_Attribute | |
enum | WriteConcurrence { WRITE_CONCURRENCE_NONE, WRITE_CONCURRENCE_PAGE, WRITE_CONCURRENCE_ELEMENT } |
enum | AttribFlag { FLAG_TAIL_INITIALIZE = 1, FLAG_STREAM_ACTIVE = 2, FLAG_STREAM_NOPREEXIST = 4 } |
Public Member Functions | |
GA_ATINumeric (const GA_AttributeType &type, const GA_IndexMap &index_map, GA_AttributeScope scope, const UT_StringHolder &name, GA_Storage store, int tuple_size, const GA_Defaults &defaults) | |
~GA_ATINumeric () override | |
int64 | getMemoryUsage (bool inclusive) const override |
void | countMemory (UT_MemoryCounter &counter, bool inclusive) const override |
void | reconstructElementBlock (GA_Offset offset, GA_Offset nelements) override |
WriteConcurrence | getSupportedWriteConcurrence () const override |
Data is paged, so concurrent writes to separate pages supported. More... | |
const GA_AIFCopyData * | getAIFCopyData () const override |
Return the attribute's copy interface or NULL. More... | |
const GA_AIFDelta * | getAIFDelta () const override |
Return the attribute's delta interface or NULL. More... | |
const GA_AIFEdit * | getAIFEdit () const override |
Return the attribute's edit interface or NULL. More... | |
const GA_AIFTuple * | getAIFTuple () const override |
Return the attribute's tuple interface or NULL. More... | |
const GA_AIFMath * | getAIFMath () const override |
Return the attribute's math interface or NULL. More... | |
const GA_AIFMerge * | getAIFMerge () const override |
Return the attribute's merge interface or NULL. More... | |
const GA_AIFInterp * | getAIFInterp () const override |
Return the attribute's interpolation interface or NULL. More... | |
const GA_AIFCompare * | getAIFCompare () const override |
Return the attribute's comparison interface or NULL. More... | |
const GA_AIFJSON * | getAIFJSON () const override |
bool | jsonLoad (UT_JSONParser &p, const GA_LoadMap &map, const GA_Defaults &defs, int tuple_size, GA_Storage storage) |
Called during JSON load. More... | |
const GA_Defaults & | getDefaults () const |
int | getTupleSize () const |
GA_Storage | getStorage () const |
bool | setTupleSize (int size) |
bool | setStorage (GA_Storage storage) |
bool | shouldInterpretAsTexCoord (bool allow_float2=false) const |
bool | isNonArithmetic () const |
Some types, especially integers, may not want to be lerped. More... | |
bool | debugValidateArrayCapacity (GA_Offset sz) const override |
Debug code. More... | |
bool | setArraySize (GA_Offset new_size) override |
Grow or shrink the array size. More... | |
void | tryCompressAllPages (GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET) override |
Try to compress data pages. More... | |
void | hardenAllPages (GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET) override |
Harden data pages. More... | |
bool | matchesStorage (const GA_Attribute *that) const override |
void | copyNonStorageMetadata (const GA_Attribute *that) override |
void | replace (const GA_Attribute &src) override |
SYS_FORCE_INLINE bool | isPageConstant (GA_PageNum pagenum) const |
template<typename SRC_DATA_T > | |
SYS_FORCE_INLINE void | setPageConstant (GA_PageNum pagenum, const SRC_DATA_T *values) |
void | defragment (const GA_Defragment &defrag) override |
bool | copy (GA_Offset desti, GA_Offset srci) overridefinal |
bool | copy (GA_Offset desti, const GA_Attribute &src, GA_Offset srci) overridefinal |
bool | copy (GA_Offset desti, const GA_ATINumeric &src, GA_Offset srci) |
bool | copy (const GA_Range &destrange, const GA_Range &srcrange) overridefinal |
bool | copy (const GA_Range &destrange, const GA_Attribute &src, const GA_Range &srcrange) overridefinal |
bool | copy (const GA_Range &destrange, const GA_ATINumeric &src, const GA_Range &srcrange) |
bool | fill (const GA_Range &destrange, GA_Offset srci) overridefinal |
bool | fill (const GA_Range &destrange, const GA_Attribute &src, GA_Offset srci) overridefinal |
bool | fill (const GA_Range &destrange, const GA_ATINumeric &src, GA_Offset srci) |
const DataType & | getData () const |
DataType & | getData () |
Public Member Functions inherited from GA_Attribute | |
GA_Attribute (const GA_AttributeType &type, const GA_IndexMap &index_map, GA_AttributeScope scope, const UT_StringHolder &name) | |
virtual | ~GA_Attribute () |
SYS_FORCE_INLINE const GA_AttributeType & | getType () const |
SYS_FORCE_INLINE const GA_IndexMap & | getIndexMap () const |
SYS_FORCE_INLINE const GA_Detail & | getDetail () const |
SYS_FORCE_INLINE GA_Detail & | getDetail () |
SYS_FORCE_INLINE GA_AttributeOwner | getOwner () const |
SYS_FORCE_INLINE GA_AttributeScope | getScope () const |
SYS_FORCE_INLINE bool | isGroup () const |
SYS_FORCE_INLINE GA_TypeInfo | getTypeInfo () const |
SYS_FORCE_INLINE void | setTypeInfo (GA_TypeInfo type) |
bool | shouldInterpretAsTexCoord (bool allow_float2=false) const |
GA_StorageClass | getStorageClass () const |
Returns the approximate type of the attribute. More... | |
int | getTupleSize () const |
Size of the AIFTuple, if it exists. If it doesn't, 1. More... | |
SYS_FORCE_INLINE const UT_StringHolder & | getName () const |
SYS_FORCE_INLINE const UT_StringHolder & | getFullName () const |
SYS_FORCE_INLINE GA_DataId | getDataId () const |
SYS_FORCE_INLINE void | assignNewDataId () |
SYS_FORCE_INLINE void | bumpDataId () |
SYS_FORCE_INLINE void | clearDataId () |
SYS_FORCE_INLINE void | cloneDataId (const GA_Attribute &src, bool allow_clear=false) |
SYS_FORCE_INLINE void | cloneOrBumpDataId (const GA_Attribute &src, bool allow_clear=false) |
NOTE: Just call cloneDataId(src). More... | |
virtual const GA_AIFBlob * | getAIFBlob () const |
Return the attribute's blob interface or NULL. More... | |
virtual const GA_AIFBlobArray * | getAIFBlobArray () const |
Return the attribute's blob array interface or NULL. More... | |
virtual const GA_AIFStringTuple * | getAIFStringTuple () const |
Return the attribute's string tuple interface or NULL. More... | |
virtual const GA_AIFSharedStringTuple * | getAIFSharedStringTuple () const |
Return the attribute's shared string tuple interface or NULL. More... | |
virtual const GA_AIFSharedStringArray * | getAIFSharedStringArray () const |
Return the attribute's shared string array interface or NULL. More... | |
virtual const GA_AIFSharedDictTuple * | getAIFSharedDictTuple () const |
Return the attribute's shared options tuple interface or NULL. More... | |
virtual const GA_AIFSharedDictArray * | getAIFSharedDictArray () const |
Return the attribute's shared options tuple interface or NULL. More... | |
virtual const GA_AIFIndexPair * | getAIFIndexPair () const |
Return the attribute's index pair interface or NULL. More... | |
virtual const GA_AIFBlindData * | getAIFBlindData () const |
Return the attribute's blind data interface or NULL. More... | |
virtual const GA_AIFNumericArray * | getAIFNumericArray () const |
Return the attribute's arraydata interface or NULL. More... | |
virtual const GA_AIFStat * | getAIFStat () const |
template<typename T > | |
const T * | getAIF () const |
Generic method for getting an AIF by type. More... | |
const GA_AttributeOptions & | getOptions () const |
GA_AttributeOptions & | getOptions () |
void | setNonTransforming (bool val) |
bool | needsTransform (bool include_P=true) const |
bool | isDetached () const |
void | mergeOptions (const GA_AttributeOptions &src) |
Merge the options passed in with the options in the attribute. More... | |
bool | importOption (const char *name, int &v) const |
bool | importOption (const char *name, bool &v) const |
bool | importOption (const char *name, fpreal32 &v) const |
bool | importOption (const char *name, fpreal64 &v) const |
bool | importOption (const char *name, UT_String &v) const |
virtual bool | needDestruction () const |
Methods which can be overridden from GA_Attribute. More... | |
virtual void | destructElement (GA_Offset offset) |
Callback invoked if needsDestruction() returns true. More... | |
void | setTailInitialization (bool onoff) |
bool | isTailInitialization () const |
Check whether the attribute is set to tail initialization. More... | |
void | reconstructElement (GA_Offset offset) |
virtual void | compactStorage () |
virtual void | batchDeletion () |
GA_Attribute * | clone (const GA_IndexMap &index_map, const UT_StringHolder &name, bool clone_options) const |
bool | jsonSaveDefinition (UT_JSONWriter &w) const |
Save the GA_Attribute-Definition section. More... | |
virtual int | getSaveVersion () const |
SYS_FORCE_INLINE GA_AttributeProxyHandle | getProxy () |
SYS_FORCE_INLINE GA_ConstAttributeProxyHandle | getProxy () const |
void | setExportName (const char *external_name) |
bool | hasExportName () const |
std::string | getExportName () const |
GA_CEAttribute * | getCEAttribute (GA_StorageClass storage, int &tuplesize, bool isarray, bool read, bool write) |
GA_CEAttribute * | getCEAttribute (GA_StorageClass storage, GA_Precision precision, int &tuplesize, bool isarray, bool read, bool write) |
void | setCEAttribute (GA_CEAttribute *ceattrib, bool leave_on_gpu=false) |
void | flushCEWriteCaches (bool clearwriteback=true) |
bool | hasPendingCEWriteBack () const |
void | flushCECaches () |
Remove all CE Caches, copying back any marked as written to. More... | |
void | stealCEAttribute (const GA_Attribute &src) |
bool | isActivelyStreamed () const |
void | setActivelyStreamed (bool isstreaming) |
bool | existedPriorToStream () const |
void | setExistedPriorToStream (bool preexisted) |
bool | hasFlag (AttribFlag flag) const |
void | setFlag (AttribFlag flag, bool onoff) |
Static Public Member Functions | |
static void | registerType () |
static SYS_FORCE_INLINE const UT_StringHolder & | getTypeName () |
static SYS_FORCE_INLINE const GA_AttributeType & | getType () |
static SYS_FORCE_INLINE bool | isType (const GA_Attribute *attrib) |
static SYS_FORCE_INLINE GA_ATINumeric * | cast (GA_Attribute *attrib) |
static SYS_FORCE_INLINE const GA_ATINumeric * | cast (const GA_Attribute *attrib) |
Static Public Member Functions inherited from GA_Attribute | |
static bool | jsonLoadDefinition (UT_JSONParser &p, GA_AttributeScope &scope, UT_WorkBuffer &type, UT_WorkBuffer &name, int64 &version, GA_AttributeOptions &options) |
Load the GA_Attribute-Definition section. More... | |
static GA_DataId | nextDataId () |
Protected Attributes | |
DataType | myData |
GA_Defaults | myDefaults |
bool | myDoMath |
Static Protected Attributes | |
static GA_AIFCopyData * | myAIFCopyData |
static GA_AIFDelta * | myAIFDelta |
static GA_AIFEdit * | myAIFEdit |
static GA_AIFTuple * | myAIFTuple |
static GA_AIFMath * | myAIFMath |
static const GA_AIFMath * | myAIFNoMath |
static GA_AIFMerge * | myAIFMerge |
static GA_AIFInterp * | myAIFInterp |
static GA_AIFJSON * | myAIFJSON |
static GA_AIFCompare * | myAIFCompare |
static const GA_AttributeType * | theAttributeType |
Additional Inherited Members | |
Protected Member Functions inherited from GA_Attribute | |
int64 | getBaseMemoryUsage () const |
void | setDetached (bool detached) |
Only called by GA_AttributeSet and GA_ElementGroup. More... | |
Static Protected Member Functions inherited from GA_Attribute | |
static bool | checkGlobalOverwrite (const GA_MergeMap &map, const GA_Attribute *attrib) |
Definition at line 49 of file GA_ATINumeric.h.
typedef GA_PageArray<void, -1, true, false> GA_ATINumeric::DataType |
Definition at line 308 of file GA_ATINumeric.h.
GA_ATINumeric::GA_ATINumeric | ( | const GA_AttributeType & | type, |
const GA_IndexMap & | index_map, | ||
GA_AttributeScope | scope, | ||
const UT_StringHolder & | name, | ||
GA_Storage | store, | ||
int | tuple_size, | ||
const GA_Defaults & | defaults | ||
) |
|
override |
|
inlinestatic |
Definition at line 65 of file GA_ATINumeric.h.
|
inlinestatic |
Definition at line 72 of file GA_ATINumeric.h.
Copy attribute values for a single element.
Reimplemented from GA_Attribute.
Definition at line 262 of file GA_ATINumeric.h.
|
inlinefinaloverridevirtual |
Copy attribute values for a single element.
Reimplemented from GA_Attribute.
Definition at line 266 of file GA_ATINumeric.h.
|
inline |
Copy attribute values for a single element.
Definition at line 273 of file GA_ATINumeric.h.
|
inlinefinaloverridevirtual |
Copy attribute values for a range of elements. WARNING: These do not support overlapping ranges within a single attribute!
Reimplemented from GA_Attribute.
Definition at line 282 of file GA_ATINumeric.h.
|
inlinefinaloverridevirtual |
Copy attribute values for a range of elements. WARNING: These do not support overlapping ranges within a single attribute!
Reimplemented from GA_Attribute.
Definition at line 287 of file GA_ATINumeric.h.
|
inline |
Copy attribute values for a range of elements. WARNING: These do not support overlapping ranges within a single attribute!
Definition at line 294 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
In the case that we're copying from an attribute whose storage type matches this exactly, this function copies the metadata not associated with the storage, e.g. myOptions, excluding the name and the data ID.
Reimplemented from GA_Attribute.
Definition at line 241 of file GA_ATINumeric.h.
|
overridevirtual |
Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. If inclusive is true, the size of this object is counted, else only memory owned by this object is counted. If this is pointed to by the calling object, inclusive should be true. If this is contained in the calling object, inclusive should be false. (Its memory was already counted in the size of the calling object.)
NOTE: If you're implementing this in a direct subclass of GA_Attribute, call getBaseMemoryUsage() to get the amount of memory in the base class. If in a more distant descendant class, call Base::countMemory(counter, false) to count the memory in Base and above, excluding sizeof(Base).
Implements GA_Attribute.
|
overridevirtual |
Debug code.
Reimplemented from GA_Attribute.
|
overridevirtual |
Interface for defragmentation
Implements GA_Attribute.
Assign all elements of a range from a single attribute value.
Reimplemented from GA_Attribute.
|
finaloverridevirtual |
Assign all elements of a range from a single attribute value.
Reimplemented from GA_Attribute.
bool GA_ATINumeric::fill | ( | const GA_Range & | destrange, |
const GA_ATINumeric & | src, | ||
GA_Offset | srci | ||
) |
Assign all elements of a range from a single attribute value.
|
inlineoverridevirtual |
Return the attribute's comparison interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 117 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Return the attribute's copy interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 103 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Return the attribute's delta interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 105 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Return the attribute's edit interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 107 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Return the attribute's interpolation interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 115 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Reimplemented from GA_Attribute.
Definition at line 150 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Return the attribute's math interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 111 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Return the attribute's merge interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 113 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Return the attribute's tuple interface or NULL.
Reimplemented from GA_Attribute.
Definition at line 109 of file GA_ATINumeric.h.
|
inline |
Provide access to data
Definition at line 312 of file GA_ATINumeric.h.
|
inline |
Provide access to data
Definition at line 313 of file GA_ATINumeric.h.
|
inline |
Definition at line 159 of file GA_ATINumeric.h.
|
overridevirtual |
Report the memory usage
NOTE: If you're implementing this in a direct subclass of GA_Attribute, call getBaseMemoryUsage() to get the amount of memory in the base class. If in a more distant descendant class, call Base::getMemoryUsage(false) to count the memory in Base and above, excluding sizeof(Base).
Implements GA_Attribute.
|
inline |
Definition at line 162 of file GA_ATINumeric.h.
|
inlineoverridevirtual |
Data is paged, so concurrent writes to separate pages supported.
Implements GA_Attribute.
Definition at line 100 of file GA_ATINumeric.h.
|
inline |
Definition at line 161 of file GA_ATINumeric.h.
|
inlinestatic |
Definition at line 57 of file GA_ATINumeric.h.
|
inlinestatic |
Definition at line 54 of file GA_ATINumeric.h.
|
overridevirtual |
Harden data pages.
Implements GA_Attribute.
|
inline |
Some types, especially integers, may not want to be lerped.
Definition at line 205 of file GA_ATINumeric.h.
|
inline |
Returns true iff the specified page is constant-compressed, where a single value is stored to represent GA_PAGE_SIZE values in the page, (or possibly fewer if only one page).
Definition at line 319 of file GA_ATINumeric.h.
|
inlinestatic |
Definition at line 60 of file GA_ATINumeric.h.
bool GA_ATINumeric::jsonLoad | ( | UT_JSONParser & | p, |
const GA_LoadMap & | map, | ||
const GA_Defaults & | defs, | ||
int | tuple_size, | ||
GA_Storage | storage | ||
) |
Called during JSON load.
|
inlineoverridevirtual |
Returns true iff that is an attribute whose content can be copied from this without any type conversions. This is important to avoid reallocation of an attribute if its storage type, including tuple size, matches the source attribute exactly.
Reimplemented from GA_Attribute.
Definition at line 226 of file GA_ATINumeric.h.
|
overridevirtual |
When the array size is grown, attributes should initialize the value appropriately. When elements are reused, however, reconstructElementBlock is called. This happens if an element is deleted and then a new element is allocated (using the existing slot)
Implements GA_Attribute.
|
static |
|
overridevirtual |
This replaces the entirety of this attribute's content and non- storage metadata (except the name) with that of the src attribute. matchesStorage(src) should already return true. This is primarily for use by GA_AttributeSet::replace(). NOTE: The internal content sizes may not match exactly if the attribute type may overallocate, but the sizes should be such that any real data will fit in the destination, so be careful and deal with the myTailInitialize flag appropriately if any extra elements aren't equal to the default.
Implements GA_Attribute.
|
overridevirtual |
Grow or shrink the array size.
Implements GA_Attribute.
|
inline |
Sets all components of all elements of the specified page to the given values. NOTE: The length of values must be equal to the tuple size.
Definition at line 327 of file GA_ATINumeric.h.
bool GA_ATINumeric::setStorage | ( | GA_Storage | storage | ) |
bool GA_ATINumeric::setTupleSize | ( | int | size | ) |
|
inline |
Checks if an attribute should be treated as a texture coordinate attribute. Ideally, we could rely on the type info being GA_TYPE_TEXTURE_COORD, but old files don't have this, and various importers don't set this. If a float[3] (optionnally float[2]) attribute's name starts with "uv" and is followed by zero or more digits (and nothing else), it's probably safe to assume that it should be treated as a texture attribute.
Definition at line 173 of file GA_ATINumeric.h.
|
overridevirtual |
Try to compress data pages.
Implements GA_Attribute.
|
staticprotected |
Definition at line 346 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 337 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 338 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 339 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 344 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 345 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 341 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 343 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 342 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 340 of file GA_ATINumeric.h.
|
protected |
Definition at line 333 of file GA_ATINumeric.h.
|
protected |
Definition at line 334 of file GA_ATINumeric.h.
|
protected |
Definition at line 335 of file GA_ATINumeric.h.
|
staticprotected |
Definition at line 348 of file GA_ATINumeric.h.