11 #ifndef __GT_DAIndirect__
12 #define __GT_DAIndirect__
42 bool flatten_nested =
false)
46 init(indirect, data, flatten_nested);
58 const char *
className()
const override {
return "GT_DAIndirect"; }
61 {
return myIndirect && myData &&
62 myIndirect->isValid() && myData->isValid(); }
64 const char *attrib_name,
66 const int expected_size)
override;
77 {
return myData->itemSize(myIndirect->getI64(offset)); }
81 for (
GT_Size off = 0; off < myIndirect->entries(); ++off)
82 sum += myData->itemSize(myIndirect->getI64(off));
86 static int getUnmapThreshold();
93 {
return myIndirect->getI64(offset); }
GT_DAIndirect(const GT_DAIndirect &src)
Copy constructor.
GT_DataArrayHandle myData
GT_DAIndirect()
Default constructor.
An array to handle indirect references (i.e. shared items)
GT_Size itemSize(GT_Offset offset) const override
Return the number of elements in the array for the given item.
int64 getDataId() const override
void updateGeoDetail(const GU_ConstDetailHandle &dtl, const char *attrib_name, GT_Owner attrib_owner, const int expected_size) override
GT_DAIndirect(const GT_DataArrayHandle &indirect, const GT_DataArrayHandle &data, bool flatten_nested=false)
Convenience constructor.
GT_Size getTotalArrayEntries() const override
Base class for a data array which references another data array.
#define GT_IMPL_INHERIT_ARRAY(MAP_INDEX, SIZE)
void init(const GT_DataArrayHandle &data)
const char * className() const override
const GT_DataArrayHandle & getIndirect() const
bool isValid() const override
Data array is valid; can be sampled from.