HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GT_DataArray Class Referenceabstract

Abstract data class for an array of float, int or string data. More...

#include <GT_DataArray.h>

+ Inheritance diagram for GT_DataArray:

Classes

class  fillV3BoxTask
 Nested class to perform filling for a POD array. More...
 
class  minMaxTask
 Compute the min & max values for an array. This fails for strings. More...
 

Public Member Functions

 GT_DataArray ()
 
 GT_DataArray (const GT_DataArray &src)
 
virtual ~GT_DataArray ()
 
virtual const char * className () const =0
 
virtual GT_DataArrayHandle harden () const
 Create a "hardened" version of the array. More...
 
virtual GT_Storage getStorage () const =0
 Type of data stored in the array. More...
 
virtual GT_Size entries () const =0
 Number of entries in the array. More...
 
virtual GT_Size itemSize (GT_Offset) const
 Return the number of elements in the array for the given item. More...
 
virtual GT_Size getTotalArrayEntries () const
 
virtual GT_Size getTupleSize () const =0
 Number of elements for each array element. More...
 
virtual int64 getMemoryUsage () const =0
 
virtual GT_Type getTypeInfo () const
 Return "type" information for the data. This defaults to GT_TYPE_NONE. More...
 
virtual bool hasArrayEntries () const
 Returns "true" if each entry is an array. More...
 
virtual bool getPointerAliasing (const void *data) const
 Return "true" if there's pointer aliasing. More...
 
virtual bool isValid () const
 Data array is valid; can be sampled from. More...
 
virtual const voidgetBackingData () const
 
virtual int64 getDataId () const
 
template<typename T >
const TgetArray (GT_DataArrayHandle &buffer) const
 Template-friendly version of getU8Array() and related methods. More...
 
virtual GT_Size getStringIndexCount () const =0
 
virtual GT_Offset getStringIndex (GT_Offset offset, int idx=0) const =0
 
virtual void getIndexedStrings (UT_StringArray &strings, UT_IntArray &indices) const =0
 
virtual void getStrings (UT_StringArray &strings) const
 
void fillStrings (UT_StringArray &result, int tuple_idx=0) const
 
virtual void fillStringArray (UT_StringArray &data, UT_ValArray< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual GT_Size getDictIndexCount () const =0
 
virtual GT_Offset getDictIndex (GT_Offset offset, int idx=0) const =0
 
virtual void getIndexedDicts (UT_Array< UT_OptionsHolder > &dicts, UT_IntArray &indices) const =0
 
virtual void getDictionaries (UT_Array< UT_OptionsHolder > &dicts) const
 
virtual void fillDictionaryArray (UT_Array< UT_OptionsHolder > &data, UT_ValArray< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void extendedFillArray (uint8 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1, fpreal black=0, fpreal white=1) const
 
virtual bool isEqual (const GT_DataArray &src) const
 Compare whether two data arrays are equal. More...
 
bool getMinMax (fpreal64 *min, fpreal64 *max) const
 Enlarge a bounding box with values of this 3-tuple array. More...
 
bool enlargeBounds (UT_BoundingBox &b) const
 
GT_Storage checkIndexing (GT_IndexingMode mode) const
 Test to see whether the data array requires int32 or int64 indexing. More...
 
void dumpValues (const char *msg=NULL) const
 For debugging, print values to stdout. More...
 
bool save (UT_JSONWriter &w, bool flat=true) const
 
void copyDataId (const GT_DataArray &src)
 
void setDataId (int64 id)
 
virtual void updateGeoDetail (const GU_ConstDetailHandle &dtl, const char *attrib_name, GT_Owner attrib_owner, const int expected_size)
 Update cached data, in case the underlying attribute changed. More...
 
template<typename T >
T getValue (GT_Offset index) const
 Public accessor for POD types. More...
 
template<typename T >
T lerpValue (GT_Offset i0, GT_Offset i1, fpreal t) const
 
template<typename T >
T bilerpValue (GT_Offset u0v0, GT_Offset u1v0, GT_Offset u0v1, GT_Offset u1v1, fpreal u, fpreal v)
 
virtual uint8 getU8 (GT_Offset offset, int idx=0) const =0
 
virtual int8 getI8 (GT_Offset offset, int idx=0) const
 
virtual int16 getI16 (GT_Offset offset, int idx=0) const
 
virtual int32 getI32 (GT_Offset offset, int idx=0) const =0
 
virtual int64 getI64 (GT_Offset offset, int idx=0) const
 
virtual fpreal16 getF16 (GT_Offset offset, int idx=0) const
 
virtual fpreal32 getF32 (GT_Offset offset, int idx=0) const =0
 
virtual fpreal64 getF64 (GT_Offset offset, int idx=0) const
 
virtual GT_String getS (GT_Offset offset, int idx=0) const =0
 
virtual bool getSA (UT_StringArray &a, GT_Offset offset) const
 
virtual GT_Dict getDict (GT_Offset offset, int idx=0) const
 
virtual bool getDictA (UT_Array< UT_OptionsHolder > &a, GT_Offset offset) const
 
virtual bool getFA16 (UT_ValArray< fpreal16 > &a, GT_Offset offset) const
 
virtual bool getFA32 (UT_ValArray< fpreal32 > &a, GT_Offset offset) const
 
virtual bool getFA64 (UT_ValArray< fpreal64 > &a, GT_Offset offset) const
 
virtual bool getUA8 (UT_ValArray< uint8 > &a, GT_Offset offset) const
 
virtual bool getIA8 (UT_ValArray< int8 > &a, GT_Offset offset) const
 
virtual bool getIA16 (UT_ValArray< int16 > &a, GT_Offset offset) const
 
virtual bool getIA32 (UT_ValArray< int32 > &a, GT_Offset offset) const
 
virtual bool getIA64 (UT_ValArray< int64 > &a, GT_Offset offset) const
 
virtual const uint8getU8Array (GT_DataArrayHandle &buffer) const
 
virtual const int8getI8Array (GT_DataArrayHandle &buffer) const
 
virtual const int16getI16Array (GT_DataArrayHandle &buffer) const
 
virtual const int32getI32Array (GT_DataArrayHandle &buffer) const
 
virtual const int64getI64Array (GT_DataArrayHandle &buffer) const
 
virtual const fpreal16getF16Array (GT_DataArrayHandle &buffer) const
 
virtual const fpreal32getF32Array (GT_DataArrayHandle &buffer) const
 
virtual const fpreal64getF64Array (GT_DataArrayHandle &buffer) const
 
const fprealgetRealArray (GT_DataArrayHandle &buffer) const
 
void import (GT_Offset idx, int8 *data, GT_Size size=0) const
 
void import (GT_Offset idx, int16 *data, GT_Size size=0) const
 
void import (GT_Offset idx, int32 *data, GT_Size size=0) const
 
void import (GT_Offset idx, int64 *data, GT_Size size=0) const
 
void import (GT_Offset idx, fpreal16 *data, GT_Size size=0) const
 
void import (GT_Offset idx, fpreal32 *data, GT_Size size=0) const
 
void import (GT_Offset idx, fpreal64 *data, GT_Size size=0) const
 
void import (GT_Offset idx, UT_ValArray< fpreal16 > &data) const
 
void import (GT_Offset idx, UT_ValArray< fpreal32 > &data) const
 
void import (GT_Offset idx, UT_ValArray< fpreal64 > &data) const
 
void import (GT_Offset idx, UT_ValArray< uint8 > &data) const
 
void import (GT_Offset idx, UT_ValArray< int8 > &data) const
 
void import (GT_Offset idx, UT_ValArray< int16 > &data) const
 
void import (GT_Offset idx, UT_ValArray< int32 > &data) const
 
void import (GT_Offset idx, UT_ValArray< int64 > &data) const
 
void import (GT_Offset idx, UT_StringArray &data) const
 
void import (GT_Offset idx, UT_Array< UT_OptionsHolder > &data) const
 
void import (GT_Offset idx, uint8 *data, GT_Size size=0, fpreal black=0, fpreal white=1) const
 
void fillArray (int8 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1) const
 
void fillArray (int16 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1) const
 
void fillArray (int32 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1) const
 
void fillArray (int64 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1) const
 
void fillArray (fpreal16 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1) const
 
void fillArray (fpreal32 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1) const
 
void fillArray (fpreal64 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1) const
 
void fillArray (uint8 *data, GT_Offset start, GT_Size length, int tsize, int stride=-1, fpreal black=0, fpreal white=1) const
 
void fillVec3BBox (fpreal32 *dest, GT_Offset start, GT_Size length, UT_BoundingBoxF &bbox, int tsize, int stride=-1)
 
void fillVec3BBox (fpreal64 *dest, GT_Offset start, GT_Size length, UT_BoundingBoxD &bbox, int tsize, int stride=-1)
 
void fillArray (UT_Array< uint8 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
void fillArray (UT_Array< int8 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
void fillArray (UT_Array< int16 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
void fillArray (UT_Array< int32 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
void fillArray (UT_Array< int64 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
void fillArray (UT_Array< fpreal16 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
void fillArray (UT_Array< fpreal32 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
void fillArray (UT_Array< fpreal64 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void extendedFill (uint8 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual void extendedFill (int8 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual void extendedFill (int16 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual void extendedFill (int32 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual void extendedFill (int64 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual void extendedFill (fpreal16 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual void extendedFill (fpreal32 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual void extendedFill (fpreal64 *data, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride=-1) const
 
virtual const uint8get (GT_Offset i, uint8 *store, int sz) const
 
virtual const int8get (GT_Offset i, int8 *store, int sz) const
 
virtual const int16get (GT_Offset i, int16 *store, int sz) const
 
virtual const int32get (GT_Offset i, int32 *store, int sz) const
 
virtual const int64get (GT_Offset i, int64 *store, int sz) const
 
virtual const fpreal16get (GT_Offset i, fpreal16 *store, int z) const
 
virtual const fpreal32get (GT_Offset i, fpreal32 *store, int z) const
 
virtual const fpreal64get (GT_Offset i, fpreal64 *store, int z) const
 
virtual void getRange (exint &lo, exint &hi, int tuple_idx=0) const
 
virtual void getRange (fpreal &lo, fpreal &hi, int tidx=0) const
 
SYS_HashType hash () const
 
virtual SYS_HashType hashRange (exint begin, exint end) const
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GT_DataArray >
SYS_FORCE_INLINE UT_IntrusiveRefCounter () noexcept
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &) noexcept
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const noexcept
 Return current counter. More...
 
SYS_FORCE_INLINE bool conditionalAddRef () noexcept
 

Static Public Member Functions

static bool isBigInteger (GT_Size size)
 Quick & dirty test to see if a size is bigger than a 32 bit int. More...
 
static voidoperator new (size_t size)
 
static voidoperator new (size_t size, void *p)
 
static void operator delete (void *p, size_t size)
 

Protected Member Functions

virtual bool computeMinMax (fpreal64 *min, fpreal64 *max) const
 
SYS_STATIC_FORCE_INLINE GT_Size fixImportTupleSize (GT_Size size, GT_Size tuple_size)
 
template<typename T_POD >
void t_extendedFill (T_POD *dest, GT_Offset start, GT_Size length, int tsize, int nrepeats, int stride) const
 Templated method to fill an array. More...
 
template<typename T_POD >
void t_extendedFillArray (UT_Array< T_POD > &dest, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 Templated method to fill an array attribute. More...
 
virtual void doImport (GT_Offset idx, uint8 *data, GT_Size size) const
 
virtual void doImport (GT_Offset idx, int8 *data, GT_Size size) const
 
virtual void doImport (GT_Offset idx, int16 *data, GT_Size size) const
 
virtual void doImport (GT_Offset idx, int32 *data, GT_Size size) const
 
virtual void doImport (GT_Offset idx, int64 *data, GT_Size size) const
 
virtual void doImport (GT_Offset idx, fpreal16 *data, GT_Size size) const
 
virtual void doImport (GT_Offset idx, fpreal32 *data, GT_Size size) const
 
virtual void doImport (GT_Offset idx, fpreal64 *data, GT_Size size) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< fpreal16 > &data) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< fpreal32 > &data) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< fpreal64 > &data) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< uint8 > &data) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< int8 > &data) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< int16 > &data) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< int32 > &data) const
 
virtual void doImportArray (GT_Offset idx, UT_ValArray< int64 > &data) const
 
virtual void doImportQuantized (GT_Offset idx, uint8 *data, GT_Size size, fpreal black, fpreal white) const
 
virtual void doFillArray (uint8 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArray (int8 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArray (int16 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArray (int32 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArray (int64 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArray (fpreal16 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArray (fpreal32 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArray (fpreal64 *data, GT_Offset start, GT_Size length, int tuple_size, int stride) const
 
virtual void doFillArrayAttr (UT_Array< uint8 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillArrayAttr (UT_Array< int8 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillArrayAttr (UT_Array< int16 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillArrayAttr (UT_Array< int32 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillArrayAttr (UT_Array< int64 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillArrayAttr (UT_Array< fpreal16 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillArrayAttr (UT_Array< fpreal32 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillArrayAttr (UT_Array< fpreal64 > &data, UT_Array< int > &sizes, GT_Offset start, GT_Size length) const
 
virtual void doFillQuantizedArray (uint8 *data, GT_Offset start, GT_Size length, int tuple_size, int stride, fpreal black, fpreal white) const
 
virtual void doExtendedQuantizedFill (uint8 *data, GT_Offset start, GT_Size length, int tuple_size, int nrepeats, int stride, fpreal black, fpreal white) const
 
virtual void doFillVec3BBox (fpreal32 *dest, GT_Offset start, GT_Size length, UT_BoundingBoxF &bbox, int, int stride)
 
virtual void doFillVec3BBox (fpreal64 *dest, GT_Offset start, GT_Size length, UT_BoundingBoxD &bbox, int, int stride)
 
- Protected Member Functions inherited from UT_IntrusiveRefCounter< GT_DataArray >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

Abstract data class for an array of float, int or string data.

This is an abstract class. The data does not have to be owned by this array. The data can be generated on the fly by the class. Or the data might be flat numeric data.

Definition at line 40 of file GT_DataArray.h.

Constructor & Destructor Documentation

GT_DataArray::GT_DataArray ( )
GT_DataArray::GT_DataArray ( const GT_DataArray src)
virtual GT_DataArray::~GT_DataArray ( )
virtual

Member Function Documentation

template<typename T >
T GT_DataArray::bilerpValue ( GT_Offset  u0v0,
GT_Offset  u1v0,
GT_Offset  u0v1,
GT_Offset  u1v1,
fpreal  u,
fpreal  v 
)
inline

Definition at line 932 of file GT_DataArray.h.

GT_Storage GT_DataArray::checkIndexing ( GT_IndexingMode  mode) const

Test to see whether the data array requires int32 or int64 indexing.

virtual bool GT_DataArray::computeMinMax ( fpreal64 min,
fpreal64 max 
) const
inlineprotectedvirtual

Reimplemented in GT_DANumeric< T >, and GT_GEOElementArray.

Definition at line 661 of file GT_DataArray.h.

void GT_DataArray::copyDataId ( const GT_DataArray src)
inline

Forcibly set the data id for the array. You take responsibility for all artifacts and crashes if you call this indiscriminately.

Definition at line 560 of file GT_DataArray.h.

virtual void GT_DataArray::doExtendedQuantizedFill ( uint8 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  nrepeats,
int  stride,
fpreal  black,
fpreal  white 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, and GT_DABool.

virtual void GT_DataArray::doFillArray ( uint8 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 700 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArray ( int8 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 704 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArray ( int16 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 707 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArray ( int32 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 710 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArray ( int64 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 713 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArray ( fpreal16 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 716 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArray ( fpreal32 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 719 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArray ( fpreal64 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, and GT_GEOElementId.

Definition at line 722 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< uint8 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 725 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< int8 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 728 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< int16 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 731 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< int32 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 734 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< int64 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 737 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< fpreal16 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 740 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< fpreal32 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 743 of file GT_DataArray.h.

virtual void GT_DataArray::doFillArrayAttr ( UT_Array< fpreal64 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 746 of file GT_DataArray.h.

virtual void GT_DataArray::doFillQuantizedArray ( uint8 data,
GT_Offset  start,
GT_Size  length,
int  tuple_size,
int  stride,
fpreal  black,
fpreal  white 
) const
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, and GT_DABool.

Definition at line 750 of file GT_DataArray.h.

virtual void GT_DataArray::doFillVec3BBox ( fpreal32 dest,
GT_Offset  start,
GT_Size  length,
UT_BoundingBoxF bbox,
int  ,
int  stride 
)
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 808 of file GT_DataArray.h.

virtual void GT_DataArray::doFillVec3BBox ( fpreal64 dest,
GT_Offset  start,
GT_Size  length,
UT_BoundingBoxD bbox,
int  ,
int  stride 
)
inlineprotectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray.

Definition at line 816 of file GT_DataArray.h.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
uint8 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DABool, and GT_DAClampedArray.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
int8 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DABool, and GT_DAClampedArray.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
int16 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DABool, and GT_DAClampedArray.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
int32 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DABool, and GT_DAClampedArray.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
int64 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DAClampedArray, and GT_DABool.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
fpreal16 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DAClampedArray, and GT_DABool.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
fpreal32 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DAClampedArray, and GT_DABool.

virtual void GT_DataArray::doImport ( GT_Offset  idx,
fpreal64 data,
GT_Size  size 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAList, GT_DAClampedArray, and GT_DABool.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< fpreal16 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< fpreal32 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< fpreal64 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< uint8 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< int8 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< int16 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< int32 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportArray ( GT_Offset  idx,
UT_ValArray< int64 > &  data 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, and GT_DAClampedArray.

virtual void GT_DataArray::doImportQuantized ( GT_Offset  idx,
uint8 data,
GT_Size  size,
fpreal  black,
fpreal  white 
) const
protectedvirtual

Virtual implementation for inline methods. Note that doImport is for tuple data, while doImportArray is for tuple array data.

void GT_DataArray::dumpValues ( const char *  msg = NULL) const

For debugging, print values to stdout.

bool GT_DataArray::enlargeBounds ( UT_BoundingBox b) const
inline

Definition at line 522 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( uint8 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 411 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( int8 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 417 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( int16 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 423 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( int32 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 429 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( int64 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 435 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( fpreal16 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 441 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( fpreal32 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 447 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFill ( fpreal64 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1 
) const
inlinevirtual

Extract an element, but making nrepeats copies. The buffer should be able to contain length*nrepeats*tsize elements When filling an RGB color, with a repeat count of 4, the resulting buffer will look like:

[ RGB0 RGB0 RGB0 RGB0 RGB1 RGB1 RGB1 RGB1 ... ]

With a repeat count of 1, this is equivalent to fillArray()

Definition at line 453 of file GT_DataArray.h.

virtual void GT_DataArray::extendedFillArray ( uint8 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride = -1,
fpreal  black = 0,
fpreal  white = 1 
) const
inlinevirtual

Definition at line 393 of file GT_DataArray.h.

void GT_DataArray::fillArray ( int8 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 314 of file GT_DataArray.h.

void GT_DataArray::fillArray ( int16 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 317 of file GT_DataArray.h.

void GT_DataArray::fillArray ( int32 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 320 of file GT_DataArray.h.

void GT_DataArray::fillArray ( int64 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 323 of file GT_DataArray.h.

void GT_DataArray::fillArray ( fpreal16 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 326 of file GT_DataArray.h.

void GT_DataArray::fillArray ( fpreal32 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 329 of file GT_DataArray.h.

void GT_DataArray::fillArray ( fpreal64 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 332 of file GT_DataArray.h.

void GT_DataArray::fillArray ( uint8 data,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  stride = -1,
fpreal  black = 0,
fpreal  white = 1 
) const
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 335 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< uint8 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 367 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< int8 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 370 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< int16 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 373 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< int32 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 376 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< int64 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 379 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< fpreal16 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 382 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< fpreal32 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 385 of file GT_DataArray.h.

void GT_DataArray::fillArray ( UT_Array< fpreal64 > &  data,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inline

Extract data for an array attribute into a flat data array. Since each entry in an array attribute varies in terms of array size, the sizes of each entry will be stored in the sizes array.

Definition at line 388 of file GT_DataArray.h.

virtual void GT_DataArray::fillDictionaryArray ( UT_Array< UT_OptionsHolder > &  data,
UT_ValArray< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlinevirtual

Fill an array of dictionaries from start to length number of entries. This should only be called for an array attribute of dictionaries. The data will contain a flattened array of dictionaries, with the sizes array containing the array length per entry.

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 234 of file GT_DataArray.h.

virtual void GT_DataArray::fillStringArray ( UT_StringArray data,
UT_ValArray< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
inlinevirtual

Fill array of strings from start to length number of entries. This should only be called for an array attribute of strings. The data will contain a flattened array of strings, with the sizes array containing the array length per entry.

Reimplemented in GT_GEOElementArray, GT_DAClampedArray, and GT_DAVaryingArray.

Definition at line 203 of file GT_DataArray.h.

void GT_DataArray::fillStrings ( UT_StringArray result,
int  tuple_idx = 0 
) const

Fill an array of std::string with the strings corresponding to each entry. There must be entries() strings in the array. Only a single tuple index is extracted.

void GT_DataArray::fillVec3BBox ( fpreal32 dest,
GT_Offset  start,
GT_Size  length,
UT_BoundingBoxF bbox,
int  tsize,
int  stride = -1 
)
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 347 of file GT_DataArray.h.

void GT_DataArray::fillVec3BBox ( fpreal64 dest,
GT_Offset  start,
GT_Size  length,
UT_BoundingBoxD bbox,
int  tsize,
int  stride = -1 
)
inline

Extract data for the entire array into a flat data array. By default, this is implemented as:

if (tuple_size <= 0)
tuple_size = getTupleSize();
for (GT_Offset idx = 0; idx < length; ++idx, data += tuple_size)
import(idx+start, data, tuple_size);

Obviously, the data array should be big enough to hold length*tuple_size elements.

The tuple size (tsize) specifies how many elements to extract from each element of this array. The stride specifies how many items to skip over for each element. With a stride of -1, the stride will be set to the tsize. Otherwise the stride will be set to the maximum of tsize and stride.

The stride can be useful when trying to interleave data. For example:

float uvbuf[ucoord->entries()*2];
ucoord->fillArray(&uvbuf[0], 0, ucoord->entries(), 1, 2);
vcoord->fillArray(&uvbuf[1], 0, vcoord->entries(), 1, 2);

Definition at line 354 of file GT_DataArray.h.

SYS_STATIC_FORCE_INLINE GT_Size GT_DataArray::fixImportTupleSize ( GT_Size  size,
GT_Size  tuple_size 
)
inlineprotected

Ensure the size is set properly when performing an import. If the size isn't specified, we use the array's tuple size, otherwise we make sure to clamp the tuple size.

Definition at line 672 of file GT_DataArray.h.

virtual const uint8* GT_DataArray::get ( GT_Offset  i,
uint8 store,
int  sz 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const int8* GT_DataArray::get ( GT_Offset  i,
int8 store,
int  sz 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const int16* GT_DataArray::get ( GT_Offset  i,
int16 store,
int  sz 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const int32* GT_DataArray::get ( GT_Offset  i,
int32 store,
int  sz 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const int64* GT_DataArray::get ( GT_Offset  i,
int64 store,
int  sz 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const fpreal16* GT_DataArray::get ( GT_Offset  i,
fpreal16 store,
int  z 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const fpreal32* GT_DataArray::get ( GT_Offset  i,
fpreal32 store,
int  z 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const fpreal64* GT_DataArray::get ( GT_Offset  i,
fpreal64 store,
int  z 
) const
virtual

Copy the data out of the array as a tuple of size entries The data may be copied, or the array may return a pointer to raw data. That is, the sub-class may not copy the data into the storage.

Reimplemented in GT_GEOElementArray, GT_DAValues< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

template<typename T >
const T* GT_DataArray::getArray ( GT_DataArrayHandle buffer) const

Template-friendly version of getU8Array() and related methods.

virtual const void* GT_DataArray::getBackingData ( ) const
inlinevirtual

If the array has backing storage, this method can be used to access the storage. The backing storage must be a flat array of interleaved values of the given pod type. For example, if the array has 35 entries of fpreal32 color (RGB) data, the pointer returned should be mapped to an array that's (35*3) fpreal32 values with the first three values representing the RGB values for the first item in the array.

Reimplemented in GT_DANumeric< T >, GusdGT_VtArray< T >, GT_DAConstantValue< T_POD >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

Definition at line 91 of file GT_DataArray.h.

virtual int64 GT_DataArray::getDataId ( ) const
inlinevirtual

Return the "data id" associated with the data. The data ID will be incremented if the data is modified. An ID less than 0 indicates that the data ID should always be considered unique and will never be the same across evaluations. This data ID can be used to detect whether attribute data has changed in similar tesselations.

Reimplemented in GT_DAIndirect, and GT_DAInherit.

Definition at line 98 of file GT_DataArray.h.

virtual GT_Dict GT_DataArray::getDict ( GT_Offset  offset,
int  idx = 0 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAIndexedDict.

Definition at line 121 of file GT_DataArray.h.

virtual bool GT_DataArray::getDictA ( UT_Array< UT_OptionsHolder > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 123 of file GT_DataArray.h.

virtual GT_Offset GT_DataArray::getDictIndex ( GT_Offset  offset,
int  idx = 0 
) const
pure virtual

When an array of dictionaries is based on an indexed list of dictionaries, this method can be used to query each element's index. If the dictionaries are not indexed, the method should return -1.

Implemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAConstantValue< T_POD >, GT_DARange, GT_DAIndexedString, GT_DAParametric, GT_DAIndexedDict, GT_DAValues< T >, GusdGT_VtStringArray< T >, GT_DAList, GT_GEOElementId, GT_DAClampedArray, GT_DARandom, and GT_DABool.

virtual GT_Size GT_DataArray::getDictIndexCount ( ) const
pure virtual

When an array of dictionaries is based on an indexed list of dictionaries, this method can be used to query the maximum number of indices. If the dictionaries are not indexed, the method should return -1.

Implemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAConstantValue< T_POD >, GT_DARange, GT_DAIndexedString, GT_DAParametric, GT_DAVaryingArray, GT_DAIndexedDict, GT_DAValues< T >, GusdGT_VtStringArray< T >, GT_DAList, GT_GEOElementId, GT_DAClampedArray, GT_DARandom, and GT_DABool.

virtual void GT_DataArray::getDictionaries ( UT_Array< UT_OptionsHolder > &  dicts) const
virtual

When an array of dictionaries is based on an indexed list of dictionaries, this method can be used to extract all the dictionaries. When you call getDictIndex(), you can look up directly into the dictionary array returned here.

virtual fpreal16 GT_DataArray::getF16 ( GT_Offset  offset,
int  idx = 0 
) const
inlinevirtual
virtual const fpreal16* GT_DataArray::getF16Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual const fpreal32* GT_DataArray::getF32Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual fpreal64 GT_DataArray::getF64 ( GT_Offset  offset,
int  idx = 0 
) const
inlinevirtual
virtual const fpreal64* GT_DataArray::getF64Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual bool GT_DataArray::getFA16 ( UT_ValArray< fpreal16 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 126 of file GT_DataArray.h.

virtual bool GT_DataArray::getFA32 ( UT_ValArray< fpreal32 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 128 of file GT_DataArray.h.

virtual bool GT_DataArray::getFA64 ( UT_ValArray< fpreal64 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 130 of file GT_DataArray.h.

virtual int16 GT_DataArray::getI16 ( GT_Offset  offset,
int  idx = 0 
) const
inlinevirtual

Get data out of the data array

Definition at line 105 of file GT_DataArray.h.

virtual const int16* GT_DataArray::getI16Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >.

virtual const int32* GT_DataArray::getI32Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual int64 GT_DataArray::getI64 ( GT_Offset  offset,
int  idx = 0 
) const
inlinevirtual
virtual const int64* GT_DataArray::getI64Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual int8 GT_DataArray::getI8 ( GT_Offset  offset,
int  idx = 0 
) const
inlinevirtual

Get data out of the data array

Definition at line 103 of file GT_DataArray.h.

virtual const int8* GT_DataArray::getI8Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >.

virtual bool GT_DataArray::getIA16 ( UT_ValArray< int16 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 136 of file GT_DataArray.h.

virtual bool GT_DataArray::getIA32 ( UT_ValArray< int32 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 138 of file GT_DataArray.h.

virtual bool GT_DataArray::getIA64 ( UT_ValArray< int64 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 140 of file GT_DataArray.h.

virtual bool GT_DataArray::getIA8 ( UT_ValArray< int8 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 134 of file GT_DataArray.h.

virtual void GT_DataArray::getIndexedDicts ( UT_Array< UT_OptionsHolder > &  dicts,
UT_IntArray indices 
) const
pure virtual

When an array of dictionaries is based on an indexed list of dictionaries, this method can be used to extract all the dictionaries and their corresponding indicies. It's possible that the indices may not be contiguous or may even be out of order.

Implemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAConstantValue< T_POD >, GT_DARange, GT_DAIndexedString, GT_DAParametric, GT_DAVaryingArray, GT_DAIndexedDict, GT_DAValues< T >, GusdGT_VtStringArray< T >, GT_DAList, GT_DAClampedArray, GT_GEOElementId, GT_DARandom, and GT_DABool.

virtual void GT_DataArray::getIndexedStrings ( UT_StringArray strings,
UT_IntArray indices 
) const
pure virtual

When an array of strings is based on an indexed list of strings, this method can be used to extract all the strings and their corresponding indicies. It's possible that the indices may not be contiguous or may even be out of order.

Implemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAConstantValue< T_POD >, GT_DARange, GT_DAIndexedString, GT_DAParametric, GT_DAVaryingArray, GT_DAIndexedDict, GT_DAValues< T >, GusdGT_VtStringArray< T >, GT_DAList, GT_GEOElementId, GT_DAClampedArray, GT_DARandom, and GT_DABool.

bool GT_DataArray::getMinMax ( fpreal64 min,
fpreal64 max 
) const
inline

Enlarge a bounding box with values of this 3-tuple array.

Definition at line 508 of file GT_DataArray.h.

virtual bool GT_DataArray::getPointerAliasing ( const void data) const
inlinevirtual

Return "true" if there's pointer aliasing.

Reimplemented in GT_DAList, GT_DAInherit, and GT_DAValues< T >.

Definition at line 79 of file GT_DataArray.h.

virtual void GT_DataArray::getRange ( exint lo,
exint hi,
int  tuple_idx = 0 
) const
virtual

Get the range of values in the array

virtual void GT_DataArray::getRange ( fpreal lo,
fpreal hi,
int  tidx = 0 
) const
virtual

Get the range of values in the array

const fpreal* GT_DataArray::getRealArray ( GT_DataArrayHandle buffer) const

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

virtual bool GT_DataArray::getSA ( UT_StringArray a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, GT_DAList, GT_DAVaryingArray, and GT_DAClampedArray.

Definition at line 118 of file GT_DataArray.h.

virtual GT_Offset GT_DataArray::getStringIndex ( GT_Offset  offset,
int  idx = 0 
) const
pure virtual

When an array of strings is based on an indexed list of strings, this method can be used to query each element's index. If the strings are not indexed, the method should return -1.

Implemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAConstantValue< T_POD >, GT_DARange, GT_DAIndexedString, GT_DAParametric, GT_DAIndexedDict, GT_DAValues< T >, GusdGT_VtStringArray< T >, GT_DAList, GT_GEOElementId, GT_DAClampedArray, GT_DARandom, and GT_DABool.

virtual GT_Size GT_DataArray::getStringIndexCount ( ) const
pure virtual

When an array of strings is based on an indexed list of strings, this method can be used to query the maximum number of indices. If the strings are not indexed, the method should return -1.

Implemented in GT_DANumeric< T >, GT_GEOElementArray, GABC_NAMESPACE::GABC_IGTArray< POD_T >, GT_DAConstantValue< T_POD >, GT_DARange, GT_DAParametric, GT_DAIndexedString, GT_DAVaryingArray, GT_DAIndexedDict, GT_DAValues< T >, GusdGT_VtStringArray< T >, GT_DAList, GT_GEOElementId, GT_DAClampedArray, GT_DARandom, and GT_DABool.

virtual void GT_DataArray::getStrings ( UT_StringArray strings) const
virtual

When an array of strings is based on an indexed list of strings, this method can be used to extract all the strings. If an index is not used, the string array may contain a NULL pointer. When you call getStringIndex(), you can look up directly into the strings array returned here.

Note, if the strings are not stored as an indexed list, this method will return an empty array.

Reimplemented in GT_DAIndexedString.

virtual GT_Size GT_DataArray::getTotalArrayEntries ( ) const
inlinevirtual

Total number of array elements if this is an array attribute. Sum of each entry's array length, as each entry's array length can vary.

Reimplemented in GT_GEOElementArray, GT_DAIndirect, GT_DAVaryingArray, GT_DAList, GT_DAConstant, GT_DASubArray, and GT_DAInherit.

Definition at line 63 of file GT_DataArray.h.

virtual const uint8* GT_DataArray::getU8Array ( GT_DataArrayHandle buffer) const
virtual

Get raw access to the data buffer (or fill the data array passed in) If the array is unable to provide a raw pointer to the underlying data, the GT_DataArrayHandle will be allocated to store the data, and it's raw data will be returned.

This means that the data returned will be destructed when the buffer is destructed. Beware.

Reimplemented in GT_DANumeric< T >, and GABC_NAMESPACE::GABC_IGTArray< POD_T >.

virtual bool GT_DataArray::getUA8 ( UT_ValArray< uint8 > &  a,
GT_Offset  offset 
) const
inlinevirtual

Get data out of the data array

Reimplemented in GT_GEOElementArray, and GT_DAVaryingArray.

Definition at line 132 of file GT_DataArray.h.

template<typename T >
T GT_DataArray::getValue ( GT_Offset  index) const
inline

Public accessor for POD types.

Definition at line 922 of file GT_DataArray.h.

virtual GT_DataArrayHandle GT_DataArray::harden ( ) const
virtual
virtual bool GT_DataArray::hasArrayEntries ( ) const
inlinevirtual

Returns "true" if each entry is an array.

Reimplemented in GT_GEOElementArray, GT_DAVaryingArray, GT_DAList, and GT_DAInherit.

Definition at line 76 of file GT_DataArray.h.

SYS_HashType GT_DataArray::hash ( ) const
inline

Compute a hash of the data in the array. The base class hash is computed

for (i = begin; i < end; ++i) {
import(i, tmp, getTupleSize());
for (t = 0; t < getTupleSize(); t++)
SYShashCombine(hash, hashNumeric(tmp[t]));
}

Where hashNumeric returns the value for integer types. Real data is cast to the corresponding unsigned integer values. For example, fpreal16

void hashNumeric(SYS_HashType &hash, fpreal16 v) {
SYShashCombine(hash, *(const uint16 *)(&v));
}
void hashNumeric(SYS_HashType &hash, fpreal32 v) {
SYShashCombine(hash, *(const uint32 *)(&v));
}

Definition at line 503 of file GT_DataArray.h.

virtual SYS_HashType GT_DataArray::hashRange ( exint  begin,
exint  end 
) const
virtual

Compute a hash of the data in the array. The base class hash is computed

SYS_HashType hash = 0;
for (i = begin; i < end; ++i) {
import(i, tmp, getTupleSize());
for (t = 0; t < getTupleSize(); t++)
SYShashCombine(hash, hashNumeric(tmp[t]));
}

Where hashNumeric returns the value for integer types. Real data is cast to the corresponding unsigned integer values. For example, fpreal16

void hashNumeric(SYS_HashType &hash, fpreal16 v) {
SYShashCombine(hash, *(const uint16 *)(&v));
}
void hashNumeric(SYS_HashType &hash, fpreal32 v) {
SYShashCombine(hash, *(const uint32 *)(&v));
}

Reimplemented in GT_DANumeric< T >, and GusdGT_VtArray< T >.

void GT_DataArray::import ( GT_Offset  idx,
int8 data,
GT_Size  size = 0 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 247 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
int16 data,
GT_Size  size = 0 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 249 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
int32 data,
GT_Size  size = 0 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 251 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
int64 data,
GT_Size  size = 0 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 253 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
fpreal16 data,
GT_Size  size = 0 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 255 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
fpreal32 data,
GT_Size  size = 0 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 257 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
fpreal64 data,
GT_Size  size = 0 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 259 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< fpreal16 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 261 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< fpreal32 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 263 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< fpreal64 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 265 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< uint8 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 267 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< int8 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 269 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< int16 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 271 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< int32 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 273 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_ValArray< int64 > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 275 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_StringArray data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 277 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
UT_Array< UT_OptionsHolder > &  data 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 279 of file GT_DataArray.h.

void GT_DataArray::import ( GT_Offset  idx,
uint8 data,
GT_Size  size = 0,
fpreal  black = 0,
fpreal  white = 1 
) const
inline

Extract data out of the array in a template friendly fashion. Unlike the get() methods, these methods will always copy data into the buffers. If the size is 0, the tuple size will be used. The data buffer must be big enough.

If the size given is larger than getTupleSize(), only the first getTupleSize() elements will be filled out (leaving the others untouched).

Definition at line 281 of file GT_DataArray.h.

static bool GT_DataArray::isBigInteger ( GT_Size  size)
inlinestatic

Quick & dirty test to see if a size is bigger than a 32 bit int.

Definition at line 539 of file GT_DataArray.h.

virtual bool GT_DataArray::isEqual ( const GT_DataArray src) const
virtual

Compare whether two data arrays are equal.

Reimplemented in GT_DANumeric< T >, and GusdGT_VtArray< T >.

virtual bool GT_DataArray::isValid ( ) const
inlinevirtual

Data array is valid; can be sampled from.

Reimplemented in GT_GEOElementArray, GT_DAInherit, GT_DAIndirect, GT_DAList, and GT_DAVaryingArray.

Definition at line 83 of file GT_DataArray.h.

virtual GT_Size GT_DataArray::itemSize ( GT_Offset  ) const
inlinevirtual

Return the number of elements in the array for the given item.

Reimplemented in GT_GEOElementArray, GT_DAIndirect, GT_DAList, GT_DAVaryingArray, GT_DAConstant, GT_DASubArray, and GT_DAInherit.

Definition at line 60 of file GT_DataArray.h.

template<typename T >
T GT_DataArray::lerpValue ( GT_Offset  i0,
GT_Offset  i1,
fpreal  t 
) const
inline

Definition at line 926 of file GT_DataArray.h.

static void GT_DataArray::operator delete ( void p,
size_t  size 
)
static

For memory tracking, we override the new/delete operators

static void* GT_DataArray::operator new ( size_t  size)
static

For memory tracking, we override the new/delete operators

static void* GT_DataArray::operator new ( size_t  size,
void p 
)
static

For memory tracking, we override the new/delete operators

bool GT_DataArray::save ( UT_JSONWriter w,
bool  flat = true 
) const

Save array to a JSON stream. The 'flat' determines how to output arrays with a tuple size greater than 1. If 'flat' is true, the output will be an uninterrupted stream of values. If 'flat' is false, then the output will look something like [[1,2,3],[4,5,6], ... ]

void GT_DataArray::setDataId ( int64  id)
inline

Set the data id - This is used by geometry arrays to copy over the data id from GA. As above, you take responsibility for all artifacts and crashes if you set this incorrectly. Do not set this if you don't know how data IDs work.

Definition at line 567 of file GT_DataArray.h.

template<typename T_POD >
void GT_DataArray::t_extendedFill ( T_POD *  dest,
GT_Offset  start,
GT_Size  length,
int  tsize,
int  nrepeats,
int  stride 
) const
protected

Templated method to fill an array.

template<typename T_POD >
void GT_DataArray::t_extendedFillArray ( UT_Array< T_POD > &  dest,
UT_Array< int > &  sizes,
GT_Offset  start,
GT_Size  length 
) const
protected

Templated method to fill an array attribute.

virtual void GT_DataArray::updateGeoDetail ( const GU_ConstDetailHandle dtl,
const char *  attrib_name,
GT_Owner  attrib_owner,
const int  expected_size 
)
inlinevirtual

Update cached data, in case the underlying attribute changed.

Reimplemented in GT_GEOAutoNormalArray, GT_GEOElementArray, GT_DAInherit, and GT_DAIndirect.

Definition at line 570 of file GT_DataArray.h.


The documentation for this class was generated from the following file: