#include <GB_AttributeHandle.h>

Public Member Functions | |
| GB_AttributeHandle () | |
| Creates an empty attribute handle. | |
| GB_AttributeHandle (const GB_AttributeHandle &gah) | |
| GB_AttributeHandle (const GB_Detail *gdp, const GB_AttributeDict *dict, GB_Attribute *attrib, int size_in_bytes, GB_AttribType type) | |
| Creates a valid attribute handle. | |
| virtual | ~GB_AttributeHandle () |
| virtual GB_AttributeHandle * | clone () const =0 |
| virtual const char * | getName () const |
| virtual void | setRawElement (GB_AttributeElem *element)=0 |
| virtual void | setRawElement (const GB_AttributeElem *element)=0 |
| int | entries () const |
| Returns the number of entries in this attribute. | |
| virtual GB_AttributeHandle & | operator= (const GB_AttributeHandle &gah) |
| void | setF (fpreal val, int index=0) |
| Generic Data Accessors. | |
| fpreal | getF (int index=0) const |
| void | setI (int val, int index=0) |
| int | getI (int index=0) const |
| void | setV2 (const UT_Vector2 &val, int index=0) |
| UT_Vector2 | getV2 (int index=0) const |
| void | setV3 (const UT_Vector3 &val, int index=0) |
| UT_Vector3 | getV3 (int index=0) const |
| void | setV4 (const UT_Vector4 &val, int index=0) |
| UT_Vector4 | getV4 (int index=0) const |
| void | setM3 (const UT_Matrix3 &val, int index=0) |
| UT_Matrix3 | getM3 (int index=0) const |
| void | setM4 (const UT_Matrix4 &val, int index=0) |
| UT_Matrix4 | getM4 (int index=0) const |
| template<typename T > | |
| bool | import (T &result) const |
| void | setP4 (const UT_Vector4 &val, int index=0) |
| p4 will return a 4th component of 1 if it does not exist | |
| UT_Vector4 | getP4 (int index=0) const |
| void | setQ (const UT_Quaternion &val, int index=0) |
| Fetch & set quaternion values. | |
| UT_Quaternion | getQ (int index=0) const |
| template<typename T > | |
| T * | getPointer (int index=0) |
| template<typename T > | |
| const T * | getPointer (int index=0) const |
| bool | setString (const UT_String &str, int index=0) |
| bool | getString (UT_String &str, int index=0, bool harden=true) const |
| void | multiply (fpreal val) |
| Unary arithmetic operations. | |
| void | setValue (fpreal val) |
| void | transform (const UT_Matrix4 &xform, const UT_Matrix4 &inverse, bool keeplengths=false) |
| void | addScale (const GB_AttributeHandle &gah, fpreal w) |
| Performs: this = this + gah * w. | |
| void | multiply (const GB_AttributeHandle &gah) |
| Performs: this = this * gah. | |
| void | divide (const GB_AttributeHandle &gah) |
| Performs: this = this / gah. | |
| void | lerp (const GB_AttributeHandle &gah, fpreal w) |
| Performs the operation this = this*(1-w) + gah*w. | |
| void | copyDataFrom (const GB_AttributeHandle &src) |
| Copies the data from the src attribute to this attribute. | |
| bool | equalData (const GB_AttributeHandle &src, fpreal64 tol) |
| void | resetData () |
| virtual bool | isAttributeValid () const =0 |
| virtual bool | isSourceAttributeValid () const =0 |
| bool | isFloatOrVectorAttribute () const |
| bool | getDefinedStrings (UT_StringArray &list, bool harden=true) const |
| int | getNumDefinedStrings () const |
| const char * | getDefinedString (int idx) const |
| Returns the idxth defined string. Returns "" if invalid. | |
| int | addDefinedString (const char *name) |
| virtual void | invalidate () |
| Invalidates the handle (gets rid of references to elements and details). | |
| const GB_Attribute * | getAttribute () const |
| GB_Attribute * | getAttribute () |
Protected Member Functions | |
| bool | isValid () const |
| bool | isSourceValid () const |
Protected Attributes | |
| GB_GenericData | myData |
Friends | |
| class | GB_AttributeListHandle |
| class | GEO_AttributeHandleList |
Definition at line 41 of file GB_AttributeHandle.h.
| GB_AttributeHandle::GB_AttributeHandle | ( | ) |
Creates an empty attribute handle.
| GB_AttributeHandle::GB_AttributeHandle | ( | const GB_AttributeHandle & | gah | ) |
The copy constructor does not copy references to the element, only to the detail and the attribute offset.
| GB_AttributeHandle::GB_AttributeHandle | ( | const GB_Detail * | gdp, | |
| const GB_AttributeDict * | dict, | |||
| GB_Attribute * | attrib, | |||
| int | size_in_bytes, | |||
| GB_AttribType | type | |||
| ) |
Creates a valid attribute handle.
| virtual GB_AttributeHandle::~GB_AttributeHandle | ( | ) | [virtual] |
| int GB_AttributeHandle::addDefinedString | ( | const char * | name | ) |
Adds a string to our string table returning the index of the resulting string. If string already is in our table, returns the existing string. Empty ("") and null strings cannot be added to the table as they are implicitly -1.
| void GB_AttributeHandle::addScale | ( | const GB_AttributeHandle & | gah, | |
| fpreal | w | |||
| ) | [inline] |
| virtual GB_AttributeHandle* GB_AttributeHandle::clone | ( | ) | const [pure virtual] |
Implemented in GEO_AttributeHandle.
| void GB_AttributeHandle::copyDataFrom | ( | const GB_AttributeHandle & | src | ) | [inline] |
Copies the data from the src attribute to this attribute.
Definition at line 168 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::divide | ( | const GB_AttributeHandle & | gah | ) | [inline] |
| int GB_AttributeHandle::entries | ( | ) | const [inline] |
Returns the number of entries in this attribute.
Definition at line 70 of file GB_AttributeHandle.h.
| bool GB_AttributeHandle::equalData | ( | const GB_AttributeHandle & | src, | |
| fpreal64 | tol | |||
| ) | [inline] |
Returns true if the data in src matches the data in this, and returns false otherwise.
Definition at line 173 of file GB_AttributeHandle.h.
| GB_Attribute* GB_AttributeHandle::getAttribute | ( | ) | [inline] |
Definition at line 217 of file GB_AttributeHandle.h.
| const GB_Attribute* GB_AttributeHandle::getAttribute | ( | ) | const [inline] |
This accessor to the GB_Attribute is not to be used. It's only purpose is backwards compatibility with functions that have not yet been converted to use GB_AttributeHandle instead of GB_Attribute.
Definition at line 216 of file GB_AttributeHandle.h.
| const char* GB_AttributeHandle::getDefinedString | ( | int | idx | ) | const |
Returns the idxth defined string. Returns "" if invalid.
| bool GB_AttributeHandle::getDefinedStrings | ( | UT_StringArray & | list, | |
| bool | harden = true | |||
| ) | const |
Returns true if the attribute handle has strings defined. It's possible that the array contains 0 strings.
| fpreal GB_AttributeHandle::getF | ( | int | index = 0 |
) | const [inline] |
| int GB_AttributeHandle::getI | ( | int | index = 0 |
) | const [inline] |
Definition at line 84 of file GB_AttributeHandle.h.
| UT_Matrix3 GB_AttributeHandle::getM3 | ( | int | index = 0 |
) | const [inline] |
Definition at line 104 of file GB_AttributeHandle.h.
| UT_Matrix4 GB_AttributeHandle::getM4 | ( | int | index = 0 |
) | const [inline] |
Definition at line 109 of file GB_AttributeHandle.h.
| virtual const char* GB_AttributeHandle::getName | ( | ) | const [virtual] |
Reimplemented in GEO_AttributeHandle.
| int GB_AttributeHandle::getNumDefinedStrings | ( | ) | const |
Returns the number of defined strings. Will return 0 if not a string table or no defined strings.
| UT_Vector4 GB_AttributeHandle::getP4 | ( | int | index = 0 |
) | const [inline] |
Definition at line 118 of file GB_AttributeHandle.h.
| const T* GB_AttributeHandle::getPointer | ( | int | index = 0 |
) | const [inline] |
Definition at line 131 of file GB_AttributeHandle.h.
| T* GB_AttributeHandle::getPointer | ( | int | index = 0 |
) | [inline] |
Definition at line 128 of file GB_AttributeHandle.h.
| UT_Quaternion GB_AttributeHandle::getQ | ( | int | index = 0 |
) | const [inline] |
Definition at line 124 of file GB_AttributeHandle.h.
| bool GB_AttributeHandle::getString | ( | UT_String & | str, | |
| int | index = 0, |
|||
| bool | harden = true | |||
| ) | const [inline] |
| UT_Vector2 GB_AttributeHandle::getV2 | ( | int | index = 0 |
) | const [inline] |
Definition at line 89 of file GB_AttributeHandle.h.
| UT_Vector3 GB_AttributeHandle::getV3 | ( | int | index = 0 |
) | const [inline] |
Definition at line 94 of file GB_AttributeHandle.h.
| UT_Vector4 GB_AttributeHandle::getV4 | ( | int | index = 0 |
) | const [inline] |
| bool GB_AttributeHandle::import | ( | T & | result | ) | const [inline] |
Definition at line 112 of file GB_AttributeHandle.h.
| virtual void GB_AttributeHandle::invalidate | ( | ) | [virtual] |
Invalidates the handle (gets rid of references to elements and details).
Reimplemented from GB_AttributeHandleBase.
Reimplemented in GEO_AttributeHandle.
| virtual bool GB_AttributeHandle::isAttributeValid | ( | ) | const [pure virtual] |
Returns true if our attribute handle is bound to a valid attribute and false otherwise.
Implemented in GEO_AttributeHandle.
| bool GB_AttributeHandle::isFloatOrVectorAttribute | ( | ) | const |
Returns true if our attribute handle is bound to a valid attribute of type GB_ATTRIB_FLOAT or GB_ATTRIB_VECTOR.
| virtual bool GB_AttributeHandle::isSourceAttributeValid | ( | ) | const [pure virtual] |
Implemented in GEO_AttributeHandle.
| bool GB_AttributeHandle::isSourceValid | ( | ) | const [protected] |
| bool GB_AttributeHandle::isValid | ( | ) | const [protected] |
Returns true if our attribute handle is valid and false otherwise (i.e. bound to both attribute and an element)
| void GB_AttributeHandle::lerp | ( | const GB_AttributeHandle & | gah, | |
| fpreal | w | |||
| ) | [inline] |
Performs the operation this = this*(1-w) + gah*w.
Definition at line 164 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::multiply | ( | const GB_AttributeHandle & | gah | ) | [inline] |
| void GB_AttributeHandle::multiply | ( | fpreal | val | ) | [inline] |
Unary arithmetic operations.
Reimplemented in GEO_AttributeHandle.
Definition at line 143 of file GB_AttributeHandle.h.
| virtual GB_AttributeHandle& GB_AttributeHandle::operator= | ( | const GB_AttributeHandle & | gah | ) | [virtual] |
The operator= does not copy references to the element, only to the detail and the attribute offset.
| void GB_AttributeHandle::resetData | ( | ) | [inline] |
Resets the value of the data to 'uninitialized'. For most types of attributes, this is zero, for others it is -1.
Definition at line 179 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::setF | ( | fpreal | val, | |
| int | index = 0 | |||
| ) | [inline] |
Generic Data Accessors.
Definition at line 77 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::setI | ( | int | val, | |
| int | index = 0 | |||
| ) | [inline] |
Definition at line 82 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::setM3 | ( | const UT_Matrix3 & | val, | |
| int | index = 0 | |||
| ) | [inline] |
Definition at line 102 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::setM4 | ( | const UT_Matrix4 & | val, | |
| int | index = 0 | |||
| ) | [inline] |
Definition at line 107 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::setP4 | ( | const UT_Vector4 & | val, | |
| int | index = 0 | |||
| ) | [inline] |
p4 will return a 4th component of 1 if it does not exist
Definition at line 116 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::setQ | ( | const UT_Quaternion & | val, | |
| int | index = 0 | |||
| ) | [inline] |
| virtual void GB_AttributeHandle::setRawElement | ( | const GB_AttributeElem * | element | ) | [pure virtual] |
Implemented in GEO_AttributeHandle.
| virtual void GB_AttributeHandle::setRawElement | ( | GB_AttributeElem * | element | ) | [pure virtual] |
Sets the element on which this attribute handle will operate The const version will set a flag and prevent you from writing data to this element.
Implemented in GEO_AttributeHandle.
| bool GB_AttributeHandle::setString | ( | const UT_String & | str, | |
| int | index = 0 | |||
| ) | [inline] |
| void GB_AttributeHandle::setV2 | ( | const UT_Vector2 & | val, | |
| int | index = 0 | |||
| ) | [inline] |
Definition at line 87 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::setV3 | ( | const UT_Vector3 & | val, | |
| int | index = 0 | |||
| ) | [inline] |
| void GB_AttributeHandle::setV4 | ( | const UT_Vector4 & | val, | |
| int | index = 0 | |||
| ) | [inline] |
| void GB_AttributeHandle::setValue | ( | fpreal | val | ) | [inline] |
Definition at line 144 of file GB_AttributeHandle.h.
| void GB_AttributeHandle::transform | ( | const UT_Matrix4 & | xform, | |
| const UT_Matrix4 & | inverse, | |||
| bool | keeplengths = false | |||
| ) | [inline] |
Definition at line 145 of file GB_AttributeHandle.h.
friend class GB_AttributeListHandle [friend] |
Definition at line 225 of file GB_AttributeHandle.h.
friend class GEO_AttributeHandleList [friend] |
Definition at line 226 of file GB_AttributeHandle.h.
GB_GenericData GB_AttributeHandle::myData [protected] |
Definition at line 229 of file GB_AttributeHandle.h.
1.5.9