31 #if UT_ASSERT_LEVEL >= UT_ASSERT_LEVEL_PARANOID
61 class ga_OffsetToIndexTrivial
65 : myStartOffset(start)
79 class ga_OffsetToIndex
83 : myStartIndex(offtoindex(startoff))
84 , myOffsetToIndex(offtoindex)
90 return myOffsetToIndex(offset) - myStartIndex;
108 template <
typename T,
typename ENABLE =
void>
156 if (actual_tuple_size == theTupleSize)
206 "Component offset not currently supported for vector/matrix types");
213 return getNonInlinePart(off);
219 "Component offset not currently supported for vector/matrix types");
226 return ALTTYPE(getAltNonInlinePart(off));
293 template <
typename T,
typename ENABLE =
void>
382 UT_ASSERT(comp == 0 &&
"Component sets on vector types unsupported");
396 UT_ASSERT(comp == 0 &&
"Component sets on vector types unsupported");
436 UT_ASSERT(comp == 0 &&
"Component sets on vector types unsupported");
450 UT_ASSERT(comp == 0 &&
"Component sets on vector types unsupported");
498 #define SCALAR(T) SYS_EnableIf< SYS_IsArithmetic<T>::value >::type
504 template <
typename T>
542 if (actual_tuple_size < minsize)
551 if (actual_tuple_size == 1)
593 UT_ASSERT_P(comp >= 0 && comp < myAttrib->getTupleSize());
599 return getNotInline(off, comp);
621 for (
int comp = 0; comp <
size; ++comp)
627 for (
int comp = 0; comp <
size; ++comp)
628 data[comp] =
src.
get<
T>(off, comp);
646 return get(off, comp);
682 template <
typename T>
768 UT_ASSERT_P(comp >= 0 && comp < myAttrib->getTupleSize());
790 for (
int comp = 0; comp <
size; ++comp)
796 for (
int comp = 0; comp <
size; ++comp)
797 src.
set(off, comp, data[comp]);
804 UT_ASSERT_P(comp >= 0 && comp < myAttrib->getTupleSize());
858 template <
typename HOLDER,
typename INDEXTYPE,
typename ATI>
916 return myAttrib->getHolder(off, comp);
924 return myAttrib->getHolderIndex(off, comp);
950 template <
typename HOLDER,
typename INDEXTYPE,
typename ATI>
970 :
Base(gdp, owner, name, minsize)
1003 rwAttrib()->setHolder(off, str, comp);
1015 rwAttrib()->setHolderIndex(off, idx, comp);
1034 template <
typename HOLDER,
typename INDEXTYPE,
typename ATI,
typename DELAYEDWRITER>
1095 return myAttrib->getHolder(off, comp);
1103 return myAttrib->getHolderIndex(off, comp);
1120 myWriter.setHolder(off, str, comp);
1124 myWriter.setHolder(range, str, comp);
1140 myWriter.setHolderIndex(off, idx, comp);
1144 myWriter.setStringIndex(range, idx, comp);
1156 namespace GA_HandleDetail
1184 #define ENABLE_ARRAY(T) SYS_EnableIf< GA_HandleDetail::IsArray<T>::value >::type
1187 template <
typename T>
1259 template <
typename T>
1311 Base::myAIF->set(
myAttrib, off, value);
1323 template <
typename T>
GA_RWBatchHandleTHolder()
GA_RWHandleT(GA_Attribute *attrib)
void setBlockFromIndices(GA_Index startidx, GA_Size nelements, const T *source, int sourcestride=1, int component=0) const
void setPageConstant(GA_PageNum pagenum, const T *values) const
SYS_FORCE_INLINE void bumpDataId()
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
Definition of a geometry attribute.
void makeConstant(const T &cval) const
GA_RWHandleT< UT_Int32Array > GA_RWHandleIA
GA_ATINumeric * operator->() const
GA_RWBatchHandleTHolder(GA_Attribute *attrib)
GA_RWHandleT< UT_Vector2D > GA_RWHandleV2D
SYS_FORCE_INLINE void set(GA_Offset off, INDEXTYPE idx) const
Store the string indexed by the idx at the given offset.
Generic Attribute Interface class to access an attribute as a array.
SYS_FORCE_INLINE ALTTYPE getAlt(GA_Offset off, int comp=0) const
GA_PageArray< BASETYPE, 1 > * myExactMatch
GA_ROHandleT< UT_StringArray > GA_ROHandleSA
SYS_FORCE_INLINE bool isPageConstant(GA_PageNum pagenum) const
GA_RWHandleTHolder(GA_Attribute *attrib)
GA_ROHandleT< int8 > GA_ROHandleC
void bind(const GA_Attribute *attrib, int minsize=1)
GA_RWHandleT< UT_FprealArray > GA_RWHandleRA
void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
GA_RWHandleTHolder< UT_OptionsHolder, GA_DictIndexType, GA_ATIDict > GA_RWHandleDict
GA_ROHandleT< UT_Vector4D > GA_ROHandleV4D
SYS_FORCE_INLINE void bind(const GA_Attribute *attrib, int minsize=1)
const DataType & getData() const
SYS_FORCE_INLINE bool isInvalid() const
virtual bool makeConstant(GA_Attribute *attrib, int32 data, int index=0) const =0
void makeConstantV(const T *cval, int size) const
SYS_FORCE_INLINE void set(GA_Offset off, int comp, const T &val) const
SYS_FORCE_INLINE const GA_IndexMap & getIndexMap() const
GA_RWHandleT< UT_QuaternionD > GA_RWHandleQD
void clear()
Clear the handle.
void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
void clear()
Clear the handle.
GA_PageArray< BASETYPE, theTupleSize > * myExactMatch
GLsizei const GLfloat * value
void bind(GA_Attribute *attrib, int minsize=1)
GA_RWHandleT< fpreal > GA_RWHandleR
GA_DataId getDataId() const
GA_AIFSharedStringArray type
const GA_Attribute * getAttribute() const
Access to attribute.
GA_RWHandleT< UT_Int64Array > GA_RWHandleIDA
GA_ROHandleT< UT_Vector4F > GA_ROHandleV4
GA_ROHandleT< UT_Vector2F > GA_ROHandleV2
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
SYS_FORCE_INLINE bool isValid() const
GA_ROHandleTHolder< UT_OptionsHolder, GA_DictIndexType, GA_ATIDict > GA_ROHandleDict
GA_ROHandleT< UT_Array< UT_OptionsHolder > > GA_ROHandleDictA
SYS_FORCE_INLINE void add(IDX_T i, SRC_DATA_T v)
component == 0 in this version
Read-Write string handle.
SYS_FORCE_INLINE void setAlt(GA_Offset off, const ALTTYPE &val) const
SYS_FORCE_INLINE void addAlt(GA_Offset off, const ALTTYPE &val) const
SYS_FORCE_INLINE bool isValid() const
SYS_FORCE_INLINE DEST_DATA_T get(IDX_T i, exint component=0) const
GA_ATINumeric * operator->() const
GA_ROHandleT< UT_Vector3D > GA_ROHandleV3D
void operator=(GA_Attribute *attrib)
bool operator==(const GA_ROHandleT< T > &handle) const
GA_ROHandleT(const GA_Attribute *attrib)
SYS_FORCE_INLINE void bind(GA_Attribute *attrib, int minsize=1)
GA_ATINumeric * getAttribute() const
GA_ROHandleT< UT_Matrix4D > GA_ROHandleM4D
GA_RWHandleT< int64 > GA_RWHandleID
void setPageConstant(GA_PageNum pagenum, const BASETYPE *values) const
SYS_FORCE_INLINE void set(GA_Offset off, T val) const
GA_RWHandleT< UT_Vector4D > GA_RWHandleV4D
SYS_FORCE_INLINE INDEXTYPE getIndex(GA_Offset off, int comp=0) const
Get the string index at the given offset.
**But if you need a result
int getTupleSize() const
Tuple size of the attribute.
SYS_FORCE_INLINE UT_FixedVector< DEST_DATA_T, DEST_TSIZE > getVector(IDX_T i) const
#define GA_INVALID_DATAID
SYS_FORCE_INLINE void bind(const GA_Attribute *attrib, int minsize=1)
SYS_FORCE_INLINE void set(const GA_Range &range, int comp, INDEXTYPE idx)
void operator=(GA_Attribute *attrib)
SYS_FORCE_INLINE void addAlt(GA_Offset off, int comp, const ALTTYPE &val) const
GA_ROHandleT< int64 > GA_ROHandleID
SYS_FORCE_INLINE void set(IDX_T i, SRC_DATA_T v)
component == 0 in this version
SYS_FORCE_INLINE bool GAisValid(GA_Size v)
SYS_FORCE_INLINE void bind(GA_ATINumeric *attrib, int minsize=1)
SYS_FORCE_INLINE void set(GA_Offset off, int comp, const HOLDER &str)
exint GA_Size
Defines the bit width for index and offset types in GA.
GA_ATINumeric * getAttribute() const
GA_ROHandleTHolder< HOLDER, INDEXTYPE, ATI > Base
const GA_Attribute * getAttribute() const
GA_ROHandleT< UT_Vector3F > GA_ROHandleV3
SYS_FORCE_INLINE bool isValid() const
GA_DataId getDataId() const
void operator=(const GA_Attribute *attrib)
A range of elements in an index-map.
GA_ROHandleT< UT_Matrix3D > GA_ROHandleM3D
SYS_FORCE_INLINE void getV(GA_Offset off, T *data, int size) const
GA_ROHandleT< UT_Matrix2F > GA_ROHandleM2
GA_RWHandleT< UT_Vector3F > GA_RWHandleV3
const GA_ATINumeric * getAttribute() const
GA_RWBatchHandleTHolder< UT_OptionsHolder, GA_DictIndexType, GA_ATIDict, GA_ATIDictDelayedWriter > GA_RWBatchHandleDict
GA_PageArray< BASETYPE > * myAlmostMatch
void makeConstant(T cval, int comp=-1) const
SYS_FORCE_INLINE bool isInvalid() const
void bind(const GA_ATINumeric *attrib, int minsize=1)
SYS_FORCE_INLINE void add(GA_Offset off, const T &val) const
GA_ROHandleT< UT_Matrix3F > GA_ROHandleM3
GA_ROHandleT< int32 > GA_ROHandleI
GA_RWHandleT< UT_Fpreal64Array > GA_RWHandleDA
SYS_FORCE_INLINE void add(GA_Offset off, int comp, T val) const
SYS_FORCE_INLINE void set(GA_Offset off, int comp, const HOLDER &str) const
SYS_FORCE_INLINE void set(GA_Offset off, int comp, T val) const
GA_RWHandleTHolder< UT_StringHolder, GA_StringIndexType, GA_ATIString > GA_RWHandleS
SYS_FORCE_INLINE void add(GA_Offset off, T val) const
const GA_AIFTuple * getAIFTuple() const override
Return the attribute's tuple interface or NULL.
SYS_FORCE_INLINE const X * cast(const InstancablePtr *o)
SYS_FORCE_INLINE void setV(GA_Offset off, const T *data, int size) const
void bind(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
void getIndexBlockFromIndices(GA_Index startidx, GA_Size nelements, INDEXTYPE *dest, int deststride=1, int component=0) const
GA_RWHandleT< UT_Fpreal32Array > GA_RWHandleFA
bool isOffsetTransient(GA_Offset offset) const
SYS_FORCE_INLINE void set(GA_Offset off, int comp, INDEXTYPE idx) const
SYS_FORCE_INLINE void set(const GA_Range &range, INDEXTYPE idx)
void getBlockFromIndices(GA_Index startidx, GA_Size nelements, T *dest, int deststride=1, int component=0) const
void operator=(GA_Attribute *attrib)
GA_RWHandleT< UT_Vector4F > GA_RWHandleV4
GA_RWHandleT< UT_Matrix2F > GA_RWHandleM2
bool operator!=(const GA_ROHandleT< T > &handle) const
SYS_FORCE_INLINE void setPageConstant(UT_PageNum pagenum, const NotVoidType &val)
static SYS_FORCE_INLINE GA_ATINumeric * cast(GA_Attribute *attrib)
void(* GAprobeAttribSetter)(GA_Attribute *atr, GA_Offset, const T &)
void getIndexBlock(GA_Offset startoff, GA_Size nelements, INDEXTYPE *dest, int deststride=1, int component=0) const
GA_ROHandleT< fpreal32 > GA_ROHandleF
SYS_FORCE_INLINE void set(GA_Offset off, const T &value) const
GLsizei GLsizei GLchar * source
const GA_ATINumeric * operator->() const
void getBlock(GA_Offset startoff, GA_Size nelements, T *dest, int deststride=1, int component=0) const
A specialization of GA_AIFStringArray to access "shared strings".
GA_RWHandleT< fpreal64 > GA_RWHandleD
void(* GAprobeAttribGetter)(T &result, const GA_Attribute *atr, GA_Offset)
void bind(GA_Attribute *attrib, int minsize=1)
Bind the handle to the given attribute.
GA_ROHandleT< UT_Fpreal64Array > GA_ROHandleDA
GA_RWHandleT< UT_Matrix4F > GA_RWHandleM4
bool operator!=(const GA_ROHandleT< T > &handle) const
GA_RWHandleT< UT_Matrix3D > GA_RWHandleM3D
GA_RWHandleTHolder(const GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
GA_ROHandleT< fpreal64 > GA_ROHandleD
const GA_Attribute * operator->() const
SYS_FORCE_INLINE T operator()(GA_Offset off, int comp=0) const
GA_HandleDetail::ArrayAIF< T >::type AIFType
GLuint const GLchar * name
SYS_FORCE_INLINE GA_DataId getDataId() const
SYS_FORCE_INLINE T operator[](GA_Offset off) const
GA_DataId getDataId() const
SYS_FORCE_INLINE bool isInvalid() const
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
GA_RWHandleT< fpreal16 > GA_RWHandleH
SYS_FORCE_INLINE void set(const GA_Range &range, const HOLDER &str)
Read-only handle for string attribute data.
UT_FixedVector< ALTBASETYPE, theTupleSize > ALTTYPE
SYS_FORCE_INLINE bool isPageConstant(GA_PageNum pagenum) const
SYS_FORCE_INLINE void add(GA_Offset off, int comp, const T &val) const
SYS_FORCE_INLINE void addVector(IDX_T i, const TS &as)
GA_ROHandleT< UT_Int32Array > GA_ROHandleIA
GA_ROHandleT< fpreal16 > GA_ROHandleH
GA_Attribute * getAttribute() const
Access to attribute.
const ATI * operator->() const
SYS_FORCE_INLINE bool isValid() const
SYS_FORCE_INLINE void set(GA_Offset off, int comp, INDEXTYPE idx)
GA_RWHandleT(GA_Attribute *attrib)
void setBlock(GA_Offset startoff, GA_Size nelements, const T *source, int sourcestride=1, int component=0) const
GA_ROHandleTHolder(const GA_Attribute *attrib)
bool operator==(const GA_ROHandleT< T > &handle) const
GA_Attribute * operator->() const
GA_ROHandleT(const GA_Attribute *attrib)
GA_RWHandleT< UT_Vector2F > GA_RWHandleV2
#define SCALAR(T)
Simplify checking for scalar types.
SYS_FORCE_INLINE bool isPageConstant(GA_PageNum pagenum) const
GA_ROHandleT< fpreal > GA_ROHandleR
SYS_FORCE_INLINE void setAlt(GA_Offset off, int comp, const ALTTYPE &val) const
void bind(const GA_Attribute *attrib, int minsize=1)
Bind the handle to the given attribute.
GA_RWHandleT< UT_Matrix4D > GA_RWHandleM4D
GA_ROHandleT< UT_FprealArray > GA_ROHandleRA
bool isOffsetActive(GA_Offset offset) const
Returns true if the specified offset is referenced by an ordered element.
SYS_FORCE_INLINE void set(const GA_Range &range, int comp, const HOLDER &str)
void operator=(const GA_Attribute *attrib)
GA_ROHandleT< UT_Matrix4F > GA_ROHandleM4
GLenum GLsizei GLsizei GLint * values
GA_RWHandleT< UT_Vector3D > GA_RWHandleV3D
GA_ROHandleT< UT_QuaternionF > GA_ROHandleQ
GA_RWHandleT< UT_Array< UT_OptionsHolder > > GA_RWHandleDictA
SYS_FORCE_INLINE GA_TypeInfo getTypeInfo() const
SYS_FORCE_INLINE void set(GA_Offset off, const T &val) const
void operator=(GA_Attribute *attrib)
SYS_FORCE_INLINE void set(GA_Offset off, const HOLDER &str) const
Store the str at the given offset.
void operator=(const GA_Attribute *attrib)
const T * getAIF() const
Generic method for getting an AIF by type.
GA_ROHandleT< UT_Int64Array > GA_ROHandleIDA
SYS_FORCE_INLINE bool isInvalid() const
GA_AIFSharedDictArray type
void bind(GA_ATINumeric *attrib, int minsize=1)
SYS_FORCE_INLINE bool isValid() const
A specialization of GA_AIFDictArray to access "shared strings".
void operator=(GA_Attribute *attrib)
GA_RWHandleT< fpreal32 > GA_RWHandleF
GA_RWHandleT< int8 > GA_RWHandleC
GA_ROHandleT(const GA_Attribute *attrib)
GA_RWHandleT(GA_Attribute *attrib)
GA_ROHandleT< UT_QuaternionD > GA_ROHandleQD
GA_DataId getDataId() const
Container class for all geometry.
GA_RWBatchHandleTHolder< UT_StringHolder, GA_StringIndexType, GA_ATIString, GA_ATIStringDelayedWriter > GA_RWBatchHandleS
SYS_FORCE_INLINE bool hasChanges() const
SYS_FORCE_INLINE const GA_PageArray< DEST_DATA_T, TSIZE, TABLEHARDENED, PAGESHARDENED > & castType() const
GA_DataId getDataId() const
void bind(GA_Detail *gdp, GA_AttributeOwner owner, const UT_StringRef &name, int minsize=1)
GA_ROHandleT< UT_Matrix2D > GA_ROHandleM2D
SYS_FORCE_INLINE void set(GA_Offset off, const HOLDER &str)
Store the str at the given offset.
bool operator==(const GA_ROHandleT< T > &handle) const
GA_ROHandleTHolder< UT_StringHolder, GA_StringIndexType, GA_ATIString > GA_ROHandleS
int getTupleSize() const
Tuple size of the attribute.
SYS_FORCE_INLINE void setVector(IDX_T i, const TS &as)
SYS_FORCE_INLINE bool isAltBound() const
GA_RWHandleT< UT_QuaternionF > GA_RWHandleQ
GA_RWHandleT< int32 > GA_RWHandleI
typename UT_StorageNum< BASETYPE >::SecondGuess ALTBASETYPE
SYS_FORCE_INLINE bool isInvalid() const
GA_ROHandleT< UT_Fpreal32Array > GA_ROHandleFA
GA_DataId getDataId() const
UT_StringHolder & operator()(exint i)
GA_RWHandleT< UT_Matrix3F > GA_RWHandleM3
const GA_ATINumeric * operator->() const
GA_PageArray< typename UT_StorageNum< BASETYPE >::SecondGuess, theTupleSize > * myAlmostMatch
SYS_FORCE_INLINE T operator()(GA_Offset off) const
SYS_FORCE_INLINE T operator[](GA_Offset off) const
SYS_FORCE_INLINE void bind(GA_Attribute *attrib, int minsize=1)
bool operator!=(const GA_ROHandleT< T > &handle) const
GA_Attribute * getAttribute() const
GA_RWHandleT< UT_Matrix2D > GA_RWHandleM2D
GA_DataId getDataId() const
SYS_FORCE_INLINE INDEXTYPE getIndex(GA_Offset off, int comp=0) const
Get the string index at the given offset.
const GA_ATINumeric * getAttribute() const
GA_DataId getDataId() const
GA_RWHandleT< UT_StringArray > GA_RWHandleSA
void operator=(const GA_Attribute *attrib)
GA_Attribute * getAttribute() const
GA_ROHandleT< UT_Vector2D > GA_ROHandleV2D
static const exint theTupleSize
void bind(const GA_ATINumeric *attrib, int minsize=1)
SYS_FORCE_INLINE void set(GA_Offset off, INDEXTYPE idx)
Store the string indexed by the idx at the given offset.