HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_DataArray Class Reference

An array of numbers with various storage types. More...

#include <GA_DataArray.h>

Classes

class  directAttributeAdapter
 
class  ga_SubPageBlock
 

Public Member Functions

 GA_DataArray (GA_Storage storage, GA_Offset size, int64 value)
 
 GA_DataArray (GA_Storage storage, GA_Offset size, fpreal value)
 
 GA_DataArray (GA_Storage storage, GA_Offset size, int slice, UT_Vector3D value)
 
 GA_DataArray (const GA_DataArray &src)
 
 ~GA_DataArray ()
 
GA_DataArrayoperator= (const GA_DataArray &src)
 
int64 getMemoryUsage (bool inclusive) const
 Report memory usage. More...
 
void countMemory (UT_MemoryCounter &counter, bool inclusive) const
 
void setArraySize (GA_Offset size)
 
GA_Offset getArraySize () const
 Query the size of the array. More...
 
GA_Storage getStorage () const
 Query the storage used for the array data. More...
 
void clear ()
 
void clearOffset (GA_Offset off, GA_Offset num)
 Clears a specific value to the default. More...
 
void makeConstant (int32 val)
 Makes the array constant. More...
 
void makeConstant (int64 val)
 
void makeConstant (fpreal32 val)
 
void makeConstant (fpreal64 val)
 
void makeVector3Constant (const int32 *val)
 
void makeVector3Constant (const int64 *val)
 
void makeVector3Constant (const fpreal32 *val)
 
void makeVector3Constant (const fpreal64 *val)
 
void shareData (GA_DataArray *src)
 
void mergeGrowArrayAndCopy (const GA_MergeMap &map, GA_AttributeOwner owner, const GA_DataArray &src)
 
void get (GA_Offset start, GA_Offset end, int32 *v, int step=1) const
 
void get (GA_Offset start, GA_Offset end, int64 *v, int step=1) const
 
void get (GA_Offset start, GA_Offset end, fpreal32 *v, int step=1) const
 
void get (GA_Offset start, GA_Offset end, fpreal64 *v, int step=1) const
 
void set (GA_Offset di, int32 val)
 Set the value at a particular index. More...
 
void set (GA_Offset di, int64 val)
 
void set (GA_Offset di, fpreal32 val)
 
void set (GA_Offset di, fpreal64 val)
 
void set (const GA_Range &di, int32 val)
 
void set (const GA_Range &di, int64 val)
 
void set (const GA_Range &di, fpreal32 val)
 
void set (const GA_Range &di, fpreal64 val)
 
void setVector3 (const GA_Range &di, const int32 *val)
 
void setVector3 (const GA_Range &di, const int64 *val)
 
void setVector3 (const GA_Range &di, const fpreal32 *val)
 
void setVector3 (const GA_Range &di, const fpreal64 *val)
 
void set (GA_Offset di, const GA_DataArray &src, GA_Offset si)
 
void set (const GA_Range &di, const GA_DataArray &src, GA_Offset si)
 
void set (const GA_Range &di, const GA_DataArray &src)
 
void set (const GA_Range &di, const GA_DataArray &src, const GA_Range &si)
 
void set (GA_Offset start, GA_Offset end, const int32 *v, int step=1)
 Set a range of values in the array. More...
 
void set (GA_Offset start, GA_Offset end, const int64 *v, int step=1)
 
void set (GA_Offset start, GA_Offset end, const fpreal32 *v, int step=1)
 
void set (GA_Offset start, GA_Offset end, const fpreal64 *v, int step=1)
 
void reset (GA_Offset di)
 Reset the value at a particular index to its default. More...
 
void reset (const GA_Range &di)
 
void xlate (const GA_Range &di, const UT_IntArray &map, int64 invalid=-1)
 
bool jsonSave (UT_JSONWriter &w, const GA_Range &it) const
 
bool jsonLoad (UT_JSONParser &p, const GA_LoadMap &map, GA_AttributeOwner owner)
 Load from a JSON stream. More...
 
bool jsonSave (UT_JSONWriter &w, const GA_Range &range, const UT_IntArray *map, int defvalue=-1) const
 
bool isSameType (const GA_DataArray &b) const
 
GA_Size marshallConstantFlagsForOutputPagesFast (const UT_ValArray< GA_PageNum > &internal_page_map, UT_BitArray &constant_flags) const
 
GA_Size marshallConstantFlagsForOutputPagesSlow (const UT_Array< ga_SubPageBlock > &internal_page_map, UT_BitArray &constant_flags) const
 
void comparePages (UT_BitArray &pages, const GA_DataArray &other) const
 
void tryCompressAllPages (GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)
 
void tryCompressSinglePage (GA_Offset pageoffset)
 
void hardenAllPages (GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)
 
void remapAndCount (GA_Offset start_offset, GA_Offset end_offset, const UT_IntArray &old2new, UT_IntArray &count)
 
int32 getI32 (GA_Offset idx) const
 
int64 getI64 (GA_Offset idx) const
 
fpreal16 getF16 (GA_Offset idx) const
 
fpreal32 getF32 (GA_Offset idx) const
 
fpreal64 getF64 (GA_Offset idx) const
 
fpreal getF (GA_Offset idx) const
 
void get (GA_Offset idx, int32 &v) const
 
void get (GA_Offset idx, int64 &v) const
 
void get (GA_Offset idx, fpreal32 &v) const
 
void get (GA_Offset idx, fpreal64 &v) const
 
void swapRange (GA_Offset a, GA_Offset b, GA_Size n)
 
void moveRange (GA_Offset src, GA_Offset dst, GA_Size n)
 
void defragment (const GA_Defragment &defrag)
 
bool isNan (GA_Offset ai) const
 
bool isNan (const GA_Range &di) const
 

Static Public Member Functions

static void setTuple (GA_DataArray *const *dest, const GA_Range &di, const GA_DataArray *const *src, int tuple_size)
 Set the value for a tuple of data array from a source tuple. More...
 
static void setTuple (GA_DataArray *const *dest, const GA_Range &di, const GA_DataArray *const *src, const GA_Range &si, int tuple_size)
 
static void setTuple (GA_DataArray *const *dest, const GA_DataArray *const *src, const GA_Range &si, const GA_MergeOffsetMap &map, int tuple_size)
 
template<typename DESTTYPE , typename MYTYPE >
static DESTTYPE directGetterScalar (const GA_DataArray *const *data, GA_Offset off, int comp)
 
template<typename SRCTYPE , typename MYTYPE >
static void directSetterScalar (GA_DataArray *const *data, GA_Offset off, int comp, SRCTYPE val)
 
template<typename SRCTYPE , typename MYTYPE >
static void directAdderScalar (GA_DataArray *const *data, GA_Offset off, int comp, SRCTYPE val)
 
template<typename DESTTYPE , typename MYTYPE >
static void directGetterVector (DESTTYPE &value, const GA_DataArray *const *data, GA_Offset off)
 
template<typename SRCTYPE , typename MYTYPE >
static void directSetterVector (GA_DataArray *const *data, GA_Offset off, const SRCTYPE &val)
 
template<typename SRCTYPE , typename MYTYPE >
static void directAdderVector (GA_DataArray *const *data, GA_Offset off, const SRCTYPE &val)
 
template<typename DESTTYPE , typename MYTYPE >
static DESTTYPE directVector3GetterScalar (const GA_DataArray *const *d, GA_Offset off, int comp)
 
template<typename SRCTYPE , typename MYTYPE >
static void directVector3SetterScalar (GA_DataArray *const *data, GA_Offset off, int comp, SRCTYPE val)
 
template<typename SRCTYPE , typename MYTYPE >
static void directVector3AdderScalar (GA_DataArray *const *data, GA_Offset off, int comp, SRCTYPE val)
 
template<typename DESTTYPE , typename MYTYPE >
static void directVector3GetterVector (DESTTYPE &value, const GA_DataArray *const *data, GA_Offset off)
 
template<typename SRCTYPE , typename MYTYPE >
static void directVector3SetterVector (GA_DataArray *const *data, GA_Offset off, const SRCTYPE &val)
 
template<typename SRCTYPE , typename MYTYPE >
static void directVector3AdderVector (GA_DataArray *const *data, GA_Offset off, const SRCTYPE &val)
 
template<typename T , typename BASETYPE , typename MYTYPE , bool READONLY>
static TdirectPageGetterVary (GA_DataArray *const *data, T *marshall, GA_Offset off, int comp, bool &isconstant)
 
template<typename T , typename BASETYPE , int TUPLE_SIZE, typename MYTYPE , bool READONLY>
static TdirectVector3PageGetterVary (GA_DataArray *const *data, T *marshall, GA_Offset off, int comp, bool &isconstant)
 
template<typename T , typename BASETYPE , typename MYTYPE >
static TdirectPageGetter (GA_DataArray *const *data, T *marshall, GA_Offset off, int comp, bool &isconstant)
 
template<typename T , typename BASETYPE , typename MYTYPE >
static TdirectVector3PageGetter (GA_DataArray *const *data, T *marshall, GA_Offset off, int comp, bool &isconstant)
 
template<typename T , typename BASETYPE , typename MYTYPE >
static TdirectPageGetterRO (const GA_DataArray *const *data, T *marshall, GA_Offset off, int comp, bool &isconstant)
 
template<typename T , typename BASETYPE , typename MYTYPE >
static TdirectVector3PageGetterRO (const GA_DataArray *const *data, T *marshall, GA_Offset off, int comp, bool &isconstant)
 
template<typename T , typename BASETYPE , int TUPLE_SIZE, typename MYTYPE >
static void directVector3PageSetterVary (GA_DataArray *const *data, const T *srcdata, GA_Offset off, int comp)
 
template<typename T , typename BASETYPE , typename MYTYPE >
static void directPageSetter (GA_DataArray *const *data, const T *srcdata, GA_Offset off, int comp)
 
template<typename T , typename BASETYPE , typename MYTYPE >
static void directVector3PageSetter (GA_DataArray *const *data, const T *srcdata, GA_Offset off, int comp)
 

Detailed Description

An array of numbers with various storage types.

GA_DataArray provides a way of storing arrays of scalar values. The array can have various storage types from 8-bit integer to 64-bit reals.

There are basic operations on the array.

See also: JSON Schema: GA_DataArray

Definition at line 49 of file GA_DataArray.h.

Constructor & Destructor Documentation

GA_DataArray::GA_DataArray ( GA_Storage  storage,
GA_Offset  size,
int64  value 
)
GA_DataArray::GA_DataArray ( GA_Storage  storage,
GA_Offset  size,
fpreal  value 
)
GA_DataArray::GA_DataArray ( GA_Storage  storage,
GA_Offset  size,
int  slice,
UT_Vector3D  value 
)

Creates a shared array if slice is other than 0. You must invoke shareData() on the resulting data to steal the 0th entries data tables.

GA_DataArray::GA_DataArray ( const GA_DataArray src)
GA_DataArray::~GA_DataArray ( )

Member Function Documentation

void GA_DataArray::clear ( )

Changes all values back to their defaults Ignored for shared arrays.

void GA_DataArray::clearOffset ( GA_Offset  off,
GA_Offset  num 
)

Clears a specific value to the default.

void GA_DataArray::comparePages ( UT_BitArray pages,
const GA_DataArray other 
) const
void GA_DataArray::countMemory ( UT_MemoryCounter counter,
bool  inclusive 
) const

Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. If inclusive is true, the size of this object is counted, else only memory owned by this object is counted. If this is pointed to by the calling object, inclusive should be true. If this is contained in the calling object, inclusive should be false. (Its memory was already counted in the size of the calling object.)

void GA_DataArray::defragment ( const GA_Defragment defrag)

Interface for defragmentation

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directAdderScalar ( GA_DataArray *const data,
GA_Offset  off,
int  comp,
SRCTYPE  val 
)
static

Direct access to compound objects.

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directAdderVector ( GA_DataArray *const data,
GA_Offset  off,
const SRCTYPE &  val 
)
static

Direct access to compound objects.

template<typename DESTTYPE , typename MYTYPE >
static DESTTYPE GA_DataArray::directGetterScalar ( const GA_DataArray *const data,
GA_Offset  off,
int  comp 
)
static

Direct access to compound objects.

template<typename DESTTYPE , typename MYTYPE >
static void GA_DataArray::directGetterVector ( DESTTYPE &  value,
const GA_DataArray *const data,
GA_Offset  off 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , typename MYTYPE >
static T* GA_DataArray::directPageGetter ( GA_DataArray *const data,
T marshall,
GA_Offset  off,
int  comp,
bool &  isconstant 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , typename MYTYPE >
static T* GA_DataArray::directPageGetterRO ( const GA_DataArray *const data,
T marshall,
GA_Offset  off,
int  comp,
bool &  isconstant 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , typename MYTYPE , bool READONLY>
static T* GA_DataArray::directPageGetterVary ( GA_DataArray *const data,
T marshall,
GA_Offset  off,
int  comp,
bool &  isconstant 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , typename MYTYPE >
static void GA_DataArray::directPageSetter ( GA_DataArray *const data,
const T srcdata,
GA_Offset  off,
int  comp 
)
static

Direct access to compound objects.

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directSetterScalar ( GA_DataArray *const data,
GA_Offset  off,
int  comp,
SRCTYPE  val 
)
static

Direct access to compound objects.

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directSetterVector ( GA_DataArray *const data,
GA_Offset  off,
const SRCTYPE &  val 
)
static

Direct access to compound objects.

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directVector3AdderScalar ( GA_DataArray *const data,
GA_Offset  off,
int  comp,
SRCTYPE  val 
)
static

Direct access to compound objects.

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directVector3AdderVector ( GA_DataArray *const data,
GA_Offset  off,
const SRCTYPE &  val 
)
static

Direct access to compound objects.

template<typename DESTTYPE , typename MYTYPE >
static DESTTYPE GA_DataArray::directVector3GetterScalar ( const GA_DataArray *const d,
GA_Offset  off,
int  comp 
)
static

Direct access to compound objects.

template<typename DESTTYPE , typename MYTYPE >
static void GA_DataArray::directVector3GetterVector ( DESTTYPE &  value,
const GA_DataArray *const data,
GA_Offset  off 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , typename MYTYPE >
static T* GA_DataArray::directVector3PageGetter ( GA_DataArray *const data,
T marshall,
GA_Offset  off,
int  comp,
bool &  isconstant 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , typename MYTYPE >
static T* GA_DataArray::directVector3PageGetterRO ( const GA_DataArray *const data,
T marshall,
GA_Offset  off,
int  comp,
bool &  isconstant 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , int TUPLE_SIZE, typename MYTYPE , bool READONLY>
static T* GA_DataArray::directVector3PageGetterVary ( GA_DataArray *const data,
T marshall,
GA_Offset  off,
int  comp,
bool &  isconstant 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , typename MYTYPE >
static void GA_DataArray::directVector3PageSetter ( GA_DataArray *const data,
const T srcdata,
GA_Offset  off,
int  comp 
)
static

Direct access to compound objects.

template<typename T , typename BASETYPE , int TUPLE_SIZE, typename MYTYPE >
static void GA_DataArray::directVector3PageSetterVary ( GA_DataArray *const data,
const T srcdata,
GA_Offset  off,
int  comp 
)
static

Direct access to compound objects.

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directVector3SetterScalar ( GA_DataArray *const data,
GA_Offset  off,
int  comp,
SRCTYPE  val 
)
static

Direct access to compound objects.

template<typename SRCTYPE , typename MYTYPE >
static void GA_DataArray::directVector3SetterVector ( GA_DataArray *const data,
GA_Offset  off,
const SRCTYPE &  val 
)
static

Direct access to compound objects.

void GA_DataArray::get ( GA_Offset  idx,
int32 v 
) const
inline

Access data from the array

Definition at line 127 of file GA_DataArray.h.

void GA_DataArray::get ( GA_Offset  idx,
int64 v 
) const
inline

Access data from the array

Definition at line 128 of file GA_DataArray.h.

void GA_DataArray::get ( GA_Offset  idx,
fpreal32 v 
) const
inline

Access data from the array

Definition at line 129 of file GA_DataArray.h.

void GA_DataArray::get ( GA_Offset  idx,
fpreal64 v 
) const
inline

Access data from the array

Definition at line 130 of file GA_DataArray.h.

void GA_DataArray::get ( GA_Offset  start,
GA_Offset  end,
int32 v,
int  step = 1 
) const
void GA_DataArray::get ( GA_Offset  start,
GA_Offset  end,
int64 v,
int  step = 1 
) const
void GA_DataArray::get ( GA_Offset  start,
GA_Offset  end,
fpreal32 v,
int  step = 1 
) const
void GA_DataArray::get ( GA_Offset  start,
GA_Offset  end,
fpreal64 v,
int  step = 1 
) const
GA_Offset GA_DataArray::getArraySize ( ) const
inline

Query the size of the array.

Definition at line 82 of file GA_DataArray.h.

fpreal GA_DataArray::getF ( GA_Offset  idx) const
inline

Access data from the array

Definition at line 125 of file GA_DataArray.h.

fpreal16 GA_DataArray::getF16 ( GA_Offset  idx) const

Access data from the array

fpreal32 GA_DataArray::getF32 ( GA_Offset  idx) const

Access data from the array

fpreal64 GA_DataArray::getF64 ( GA_Offset  idx) const

Access data from the array

int32 GA_DataArray::getI32 ( GA_Offset  idx) const

Access data from the array

int64 GA_DataArray::getI64 ( GA_Offset  idx) const

Access data from the array

int64 GA_DataArray::getMemoryUsage ( bool  inclusive) const

Report memory usage.

GA_Storage GA_DataArray::getStorage ( ) const
inline

Query the storage used for the array data.

Definition at line 85 of file GA_DataArray.h.

void GA_DataArray::hardenAllPages ( GA_Offset  start_offset = GA_Offset(0),
GA_Offset  end_offset = GA_INVALID_OFFSET 
)

Harden data pages Will harden all pages overlapping the specified offset range.

bool GA_DataArray::isNan ( GA_Offset  ai) const

Test for NAN's

bool GA_DataArray::isNan ( const GA_Range di) const

Test for NAN's

bool GA_DataArray::isSameType ( const GA_DataArray b) const
inline

Definition at line 235 of file GA_DataArray.h.

bool GA_DataArray::jsonLoad ( UT_JSONParser p,
const GA_LoadMap map,
GA_AttributeOwner  owner 
)

Load from a JSON stream.

bool GA_DataArray::jsonSave ( UT_JSONWriter w,
const GA_Range it 
) const

Save data to a JSON stream.

JSON Schema: GA_DataArray

{
"name" : "GA_DataArray",
"description" : "An array of numbers",
"type" : "array",
"items" : "number",
}
See Also
JSON_FileFormat
bool GA_DataArray::jsonSave ( UT_JSONWriter w,
const GA_Range range,
const UT_IntArray map,
int  defvalue = -1 
) const

Save with an integer translation. This method is just like the standard jsonSave() method. However each value is used as an index into the integer array. The value stored in the array is written instead of the raw value.

for (GA_Iterator it(range); !it.atEnd(); ++it) {
idx = getInteger(it.getOffset());
json.write( idx < 0 || idx >= map.entries() ? -1 : map(idx) );
}
void GA_DataArray::makeConstant ( int32  val)

Makes the array constant.

void GA_DataArray::makeConstant ( int64  val)
void GA_DataArray::makeConstant ( fpreal32  val)
void GA_DataArray::makeConstant ( fpreal64  val)
void GA_DataArray::makeVector3Constant ( const int32 val)
void GA_DataArray::makeVector3Constant ( const int64 val)
void GA_DataArray::makeVector3Constant ( const fpreal32 val)
void GA_DataArray::makeVector3Constant ( const fpreal64 val)
GA_Size GA_DataArray::marshallConstantFlagsForOutputPagesFast ( const UT_ValArray< GA_PageNum > &  internal_page_map,
UT_BitArray constant_flags 
) const

Marshall a bit array indicating which output pages are constant given the internal page mapping. The mapping consists of a list of internal pages with the start of each output page indicated by a negative value, (-(internal_page + 1)).

This method considers any internal pages not already marked constant as varying.

Returns the total number of constant output pages.

GA_Size GA_DataArray::marshallConstantFlagsForOutputPagesSlow ( const UT_Array< ga_SubPageBlock > &  internal_page_map,
UT_BitArray constant_flags 
) const
void GA_DataArray::mergeGrowArrayAndCopy ( const GA_MergeMap map,
GA_AttributeOwner  owner,
const GA_DataArray src 
)

mergeGrowArrayAndCopy() is called to grow the data array while copying data from the source. If the array is packed, this must only be invoked on the 0th array, and the other shared arrays must be updated by calling shareData()

void GA_DataArray::moveRange ( GA_Offset  src,
GA_Offset  dst,
GA_Size  n 
)

Interface for defragmentation

GA_DataArray& GA_DataArray::operator= ( const GA_DataArray src)
void GA_DataArray::remapAndCount ( GA_Offset  start_offset,
GA_Offset  end_offset,
const UT_IntArray old2new,
UT_IntArray count 
)

Remaps all numbers through the lookup table. Negative numbers get mapped to -1. Counts the number of occurrences of each number in the counter, which should be pre-allocated to your maximum size. Inclusive count measures the source indices, not destination.

void GA_DataArray::reset ( GA_Offset  di)

Reset the value at a particular index to its default.

void GA_DataArray::reset ( const GA_Range di)
void GA_DataArray::set ( GA_Offset  di,
int32  val 
)

Set the value at a particular index.

void GA_DataArray::set ( GA_Offset  di,
int64  val 
)
void GA_DataArray::set ( GA_Offset  di,
fpreal32  val 
)
void GA_DataArray::set ( GA_Offset  di,
fpreal64  val 
)
void GA_DataArray::set ( const GA_Range di,
int32  val 
)
void GA_DataArray::set ( const GA_Range di,
int64  val 
)
void GA_DataArray::set ( const GA_Range di,
fpreal32  val 
)
void GA_DataArray::set ( const GA_Range di,
fpreal64  val 
)
void GA_DataArray::set ( GA_Offset  di,
const GA_DataArray src,
GA_Offset  si 
)
void GA_DataArray::set ( const GA_Range di,
const GA_DataArray src,
GA_Offset  si 
)
void GA_DataArray::set ( const GA_Range di,
const GA_DataArray src 
)
void GA_DataArray::set ( const GA_Range di,
const GA_DataArray src,
const GA_Range si 
)
void GA_DataArray::set ( GA_Offset  start,
GA_Offset  end,
const int32 v,
int  step = 1 
)

Set a range of values in the array.

void GA_DataArray::set ( GA_Offset  start,
GA_Offset  end,
const int64 v,
int  step = 1 
)
void GA_DataArray::set ( GA_Offset  start,
GA_Offset  end,
const fpreal32 v,
int  step = 1 
)
void GA_DataArray::set ( GA_Offset  start,
GA_Offset  end,
const fpreal64 v,
int  step = 1 
)
void GA_DataArray::setArraySize ( GA_Offset  size)

Change the size of the array If the array is packed, this must only be invoked on the 0th array, and the other shared arrays must be updated by calling shareData()

static void GA_DataArray::setTuple ( GA_DataArray *const dest,
const GA_Range di,
const GA_DataArray *const src,
int  tuple_size 
)
static

Set the value for a tuple of data array from a source tuple.

static void GA_DataArray::setTuple ( GA_DataArray *const dest,
const GA_Range di,
const GA_DataArray *const src,
const GA_Range si,
int  tuple_size 
)
static
static void GA_DataArray::setTuple ( GA_DataArray *const dest,
const GA_DataArray *const src,
const GA_Range si,
const GA_MergeOffsetMap map,
int  tuple_size 
)
static
void GA_DataArray::setVector3 ( const GA_Range di,
const int32 val 
)
void GA_DataArray::setVector3 ( const GA_Range di,
const int64 val 
)
void GA_DataArray::setVector3 ( const GA_Range di,
const fpreal32 val 
)
void GA_DataArray::setVector3 ( const GA_Range di,
const fpreal64 val 
)
void GA_DataArray::shareData ( GA_DataArray src)

We can have multiple data arrays refer to the same structure with different slice/vectorsizes. The 0th is always the true owner the rest need to do a shareData to track any changes.

void GA_DataArray::swapRange ( GA_Offset  a,
GA_Offset  b,
GA_Size  n 
)

Interface for defragmentation

void GA_DataArray::tryCompressAllPages ( GA_Offset  start_offset = GA_Offset(0),
GA_Offset  end_offset = GA_INVALID_OFFSET 
)

Try to compress data pages Will try to compress all pages overlapping the specified offset range.

void GA_DataArray::tryCompressSinglePage ( GA_Offset  pageoffset)

Compresses a specific page. Pass in the offset whose page you wish to compress, not the page id.

void GA_DataArray::xlate ( const GA_Range di,
const UT_IntArray map,
int64  invalid = -1 
)

Integer values in the array are re-mapped to the values stored in the map.

for (GA_Iterator it(di); !it.atEnd(); ++it) {
idx = array[it];
array[it] = idx < 0 || idx >= map.entries() ? invalid : map(idx);
}

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