|
HDK
|
#include <IMX_Attribute.h>
Static Public Member Functions | |
| static IMX_AttributePtr | load (UT_IStream &is) |
| static IMX_AttributePtr | loadJSON (UT_JSONParser &p) |
| static int | registerAttribute (IMX_AttributeConstPtr vdb, UT_IntArray ®istered) |
| static void | unregisterAttributes (UT_IntArray ®istered) |
| static IMX_AttributeConstPtr | lookupAttribute (int handle) |
| Look up a registered vdb by handle. More... | |
| template<typename T , typename OP > | |
| static void | dispatch (const OP &op, int channels) |
Protected Attributes | |
| UT_SharedPtr< GA_CEAttribute > | myData |
| UT_OptionsHolder | myProperties |
| GA_TypeInfo | myTypeInfo = GA_TypeInfo::GA_TYPE_VOID |
| GA_AttributeOwner | myOwner = GA_ATTRIB_INVALID |
| GA_Defaults | myDefaults |
| bool | myStealable = true |
Friends | |
| IMX_API size_t | UTformatBuffer (char *buffer, size_t buffer_size, const IMX_Attribute &v) |
Definition at line 40 of file IMX_Attribute.h.
| IMX_Attribute::IMX_Attribute | ( | ) |
An un-allocated null-Attribute, but with default meta data.
|
inline |
Definition at line 46 of file IMX_Attribute.h.
|
inlinenoexcept |
Definition at line 47 of file IMX_Attribute.h.
| IMX_Attribute::~IMX_Attribute | ( | ) |
|
inline |
True if there are any CPU or GPU buffers, they may not have valid data - use isDirty() to see that.
Definition at line 149 of file IMX_Attribute.h.
| bool IMX_Attribute::buildFromAttribute | ( | const GA_Attribute * | attrib, |
| GA_AttributeOwner | owner | ||
| ) |
| void IMX_Attribute::buildFromEntries | ( | GA_StorageClass | storage, |
| int | tuplesize, | ||
| const IMX_Attribute * | src | ||
| ) |
If the storage/tuple match we get a direct copy, otherwise zero init.
| void IMX_Attribute::buildFromEntries | ( | GA_StorageClass | storage, |
| int | tuplesize, | ||
| GA_Precision | precision, | ||
| GA_TypeInfo | typeinfo, | ||
| bool | isarray, | ||
| exint | entries | ||
| ) |
| void IMX_Attribute::clearInUseGPUFlag | ( | ) | const |
| fpreal64 IMX_Attribute::computeMaxLength | ( | ) | const |
| fpreal64 IMX_Attribute::computeMinLength | ( | ) | const |
| void IMX_Attribute::copy | ( | const IMX_Attribute & | other | ) |
Assignment operators.
| void IMX_Attribute::copyMetadataToOptions | ( | UT_Options & | opt | ) | const |
Write our fields into the provided options: This does not include properties.
|
inline |
The actual attribute data. This should be accessed via an accessor normally but can be used to trigger sharing.
Definition at line 127 of file IMX_Attribute.h.
|
inline |
Definition at line 128 of file IMX_Attribute.h.
|
inline |
Definition at line 110 of file IMX_Attribute.h.
| void IMX_Attribute::destroy | ( | ) |
Frees all the memory.
|
inline |
This function calls operator() on op with a zero-initialized value matching the attribute's storage type and number of channels.
Definition at line 187 of file IMX_Attribute.h.
|
inlinestatic |
This function calls operator() on op with a zero-initialized value matching the storage type and number of channels.
Definition at line 212 of file IMX_Attribute.h.
|
inline |
Definition at line 99 of file IMX_Attribute.h.
| void IMX_Attribute::freeBuffers | ( | ) |
Frees all buffers and marks dirty.
| GA_CEAttributeAccessorPtr IMX_Attribute::getCEAttributeAccessor | ( | bool | read, |
| bool | write | ||
| ) |
Builds an accessor to the underlying GA_CEAttribute. NOTE: The GA_CEAttributeAccessor should have its lifetime go until after the kernel has been dispatched.
|
inline |
Definition at line 91 of file IMX_Attribute.h.
|
inline |
Definition at line 95 of file IMX_Attribute.h.
|
inline |
Definition at line 93 of file IMX_Attribute.h.
|
inline |
Definition at line 101 of file IMX_Attribute.h.
| int64 IMX_Attribute::getDeviceMemoryUsage | ( | ) | const |
| int64 IMX_Attribute::getMemoryUsage | ( | ) | const |
|
inline |
Definition at line 104 of file IMX_Attribute.h.
|
inline |
True if there are no VDB grids on GPU or CPU.
Definition at line 139 of file IMX_Attribute.h.
|
inline |
Definition at line 118 of file IMX_Attribute.h.
|
inline |
Definition at line 117 of file IMX_Attribute.h.
|
static |
Returns a newly created Attribute loaded from the stream, or null if load failure.
|
static |
|
static |
Look up a registered vdb by handle.
|
inline |
Definition at line 53 of file IMX_Attribute.h.
|
inline |
Definition at line 56 of file IMX_Attribute.h.
|
inline |
The owner represents what they came from, that can be help in debugging and tracking.
Definition at line 114 of file IMX_Attribute.h.
|
inline |
Definition at line 103 of file IMX_Attribute.h.
|
inline |
Definition at line 156 of file IMX_Attribute.h.
| bool IMX_Attribute::rawData | ( | UT_WorkBuffer & | data | ) | const |
Returns the contiguous raw bytes for a numeric non-array attribute.
|
static |
Attribute registration to allow vdbs to be converted to integers across HOM boundaries. Registers & returns the handle, adding the handle to the registered list
| bool IMX_Attribute::save | ( | std::ostream & | os | ) | const |
Returns true for successful save.
| bool IMX_Attribute::saveJSON | ( | UT_JSONWriter & | w | ) | const |
|
inline |
Definition at line 109 of file IMX_Attribute.h.
| void IMX_Attribute::setInUseGPUFlag | ( | ) | const |
In Use flags pass through to the underlying structure. This is suspect, you should be holding an accessor instead.
|
inline |
Definition at line 115 of file IMX_Attribute.h.
|
inline |
Definition at line 154 of file IMX_Attribute.h.
| bool IMX_Attribute::setRawData | ( | const char * | data, |
| exint | length | ||
| ) |
Replaces the contiguous raw bytes for a numeric non-array attribute.
|
inline |
Can be used to control what stealable() subsequently returns. If set to true, indicates to the verbs that this buffer may be stolen from.
Definition at line 136 of file IMX_Attribute.h.
|
inline |
Definition at line 106 of file IMX_Attribute.h.
|
inline |
True if data in this buffer may be stolen from (or changed) by the verbs even if it's an input.
Definition at line 132 of file IMX_Attribute.h.
|
inline |
Definition at line 102 of file IMX_Attribute.h.
| void IMX_Attribute::swap | ( | IMX_Attribute & | other | ) |
|
inline |
Definition at line 100 of file IMX_Attribute.h.
|
inline |
Definition at line 107 of file IMX_Attribute.h.
|
static |
Unregister all vdbs corresponding to the provided list, erase the list afterwards. Assertion if handle wasn't regsitered
| void IMX_Attribute::updateMetadataFromOptions | ( | const UT_Options & | opt | ) |
Load ourselves from the options, ignoring fields we don't know.
|
inline |
Updates the contents of the properties, first making sure it is unique. The provided operator should take a reference to a UT_Options that it will update. this->update([](UT_Options &opt) { opt.setOptionS("test", "bar"); });
Definition at line 164 of file IMX_Attribute.h.
|
friend |
|
protected |
Definition at line 235 of file IMX_Attribute.h.
|
protected |
Definition at line 240 of file IMX_Attribute.h.
|
protected |
Definition at line 239 of file IMX_Attribute.h.
|
protected |
Definition at line 236 of file IMX_Attribute.h.
|
mutableprotected |
Can data of this buffer be stolen by the verbs? TODO: who should reset this and when?
Definition at line 244 of file IMX_Attribute.h.
|
protected |
Definition at line 238 of file IMX_Attribute.h.