HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_ATIIndexPair.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GA_ATIIndexPair.h ( GA Library, C++)
7  *
8  * COMMENTS: Index Pair ATI (Attribute Type Implementation)
9  *
10  * Currently implemented with two data array tuples,
11  * one for the indices, and one for the values.
12  *
13  * We should support a single index mapping to a value tuple,
14  * instead of just a single value. The basic GA_Attribute
15  * interface simply accesses the first entry in any value
16  * tuple.
17  *
18  * The GA_Attribute level tuple size refers to the number of
19  * index pair entries. However, the defaults set at the base
20  * class are the defaults for a single entry, and so should match
21  * the tuple size of the value tuple.
22  *
23  * // TODO: Turn the base GA_Attribute interface into a sparse
24  * // array interface. getTupleSize() would return an
25  * // upper bound on the index and the get/set methods
26  * // would function implement an abstract
27  * // maximum index
28  */
29 
30 #pragma once
31 
32 #ifndef __GA_ATIIndexPair
33 #define __GA_ATIIndexPair
34 
35 #define GA_INDEX_PAIR_USE_PAGE_ARRAY 0
36 
37 #include "GA_API.h"
38 #include "GA_Attribute.h"
39 #include "GA_AttributeType.h"
40 #if !GA_INDEX_PAIR_USE_PAGE_ARRAY
41 #include "GA_DataArray.h"
42 #include "GA_DataArrayTuple.h"
43 #endif
44 #include "GA_Defaults.h"
45 #if GA_INDEX_PAIR_USE_PAGE_ARRAY
46 #include "GA_PageArray.h"
47 #endif
48 #include "GA_Range.h"
49 #include "GA_Types.h"
50 
51 #include <UT/UT_Assert.h>
52 #include <UT/UT_ConcurrentVector.h>
53 #include <UT/UT_Lock.h>
54 #include <UT/UT_StringHolder.h>
55 #include <UT/UT_VectorTypes.h>
56 
57 #include <SYS/SYS_AtomicInt.h>
58 #include <SYS/SYS_Inline.h>
59 #include <SYS/SYS_Types.h>
60 
61 
62 class GA_AIFCompare;
63 class GA_AIFCopyData;
64 class GA_AIFEdit;
65 class GA_AIFIndexPair;
67 class GA_AIFInterp;
68 class GA_AIFJSON;
69 class GA_AIFMath;
70 class GA_AIFMerge;
71 class GA_AIFTuple;
72 class GA_Defragment;
73 class GA_IndexMap;
74 class GA_LoadMap;
75 class GA_MergeMap;
76 class GA_SaveMap;
77 class ga_IndexPairObjectSets;
78 
79 class UT_JSONParser;
80 class UT_JSONWriter;
81 class UT_MemoryCounter;
82 
83 
85 {
86 public:
87  static void registerType();
89  static const UT_StringHolder &getTypeName()
90  { return theAttributeType->getTypeName(); }
92  static const GA_AttributeType &getType() { return *theAttributeType; }
93 
95  static bool isType(const GA_Attribute *attrib)
96  {
97  return attrib && &attrib->getType() == theAttributeType;
98  }
101  {
102  if (attrib && &attrib->getType() == theAttributeType)
103  return static_cast<GA_ATIIndexPair *>(attrib);
104  return nullptr;
105  }
107  static const GA_ATIIndexPair *cast(const GA_Attribute *attrib)
108  {
109  if (attrib && &attrib->getType() == theAttributeType)
110  return static_cast<const GA_ATIIndexPair *>(attrib);
111  return nullptr;
112  }
113 
115  const GA_IndexMap &index_map, GA_AttributeScope scope,
116  const UT_StringHolder &name,
117  GA_Storage value_store, int entries, int tuple_size,
118  const GA_Defaults &index_default,
119  const GA_Defaults &value_defaults);
120  ~GA_ATIIndexPair() override;
121 
122  /// Report memory used
123  int64 getMemoryUsage(bool inclusive) const override;
124 
125  void countMemory(UT_MemoryCounter &counter, bool inclusive) const override;
126 
128  GA_Offset nelements) override;
129 
130  /// @{
131  /// Interface for defragmentation
132  void defragment(const GA_Defragment &defrag) override;
133  /// @}
134 
135  /// Adding entries is thread-safe, so we're only subject to GA_DataArray
136  /// limitations.
138  { return WRITE_CONCURRENCE_PAGE; }
139 
140  const GA_AIFCopyData *getAIFCopyData() const override
141  { return myAIFCopyData; }
142  const GA_AIFIndexPair *getAIFIndexPair() const override
143  { return myAIFPair; }
144  const GA_AIFMerge *getAIFMerge() const override
145  { return myAIFMerge; }
146  const GA_AIFEdit *getAIFEdit() const override
147  { return myAIFEdit; }
148  const GA_AIFTuple *getAIFTuple() const override
149  { return myAIFTuple; }
150  const GA_AIFMath *getAIFMath() const override
151  { return myAIFMath; }
152  const GA_AIFInterp *getAIFInterp() const override
153  { return myAIFInterp; }
154  const GA_AIFCompare *getAIFCompare() const override
155  { return myAIFCompare; }
156 
157  /// @section JSON-GA_ATIIndexPair JSON Schema: GA_ATIIndexPair
158  /// @code
159  /// {
160  /// "name" : "GA_ATIIndexPair",
161  /// "description" : "An tuple array of indexed strings",
162  /// "type" : "orderedmap",
163  /// "properties": {
164  /// "idefault": {
165  /// "type" : {"$ref":"GA_Defaults"},
166  /// "description" : "Defaults for index values",
167  /// "optional" : true,
168  /// },
169  /// "vdefault": {
170  /// "type" : {"$ref":"GA_Defaults"},
171  /// "description" : "Defaults for values",
172  /// "optional" : true,
173  /// },
174  /// "entries": {
175  /// "type" : "integer",
176  /// "description" : "Number of entries for index/values tuples",
177  /// },
178  /// "istorage": {
179  /// "type" : "string",
180  /// "description" : "Storage type for index values",
181  /// "enum" : [ "int8", "int16", "int32", "int64" ],
182  /// },
183  /// "vstorage": {
184  /// "type" : "string",
185  /// "description" : "Storage type for values",
186  /// "enum" : [ "fpreal16", "fpreal32", "fpreal64" ],
187  /// },
188  /// "index": {
189  /// "type" : {"$ref":"GA_DataArrayTuple"},
190  /// "description" : "Index values.",
191  /// },
192  /// "value": {
193  /// "type" : {"$ref":"GA_DataArrayTuple"},
194  /// "description" : "Weight values.",
195  /// },
196  /// },
197  /// }
198  /// @endcode
199  /// @see @ref JSON_FileFormat
200  const GA_AIFJSON *getAIFJSON() const override { return myAIFJSON; }
201 
202  int getEntries() const { return myEntryCapacity.relaxedLoad(); }
203  /// setEntries() is NOT thread-safe. To concurrently grow the entry
204  /// capacity, use growEntriesTo(size, true).
205  bool setEntries(int size);
206  /// Use growEntriesTo() instead of setEntries() to ensure that the entry
207  /// capacity never shrinks. This is necessary for concurrent growing of
208  /// the entry capacity to properly handle the situation where one thread
209  /// tries to grow the entries less than another. Set the concurrent arg
210  /// if more than one thread can call this method concurrently.
211  bool growEntriesTo(int size, bool concurrent = false);
212 
213  bool setDataStorage(GA_Storage storage);
214  bool setIndexStorage(GA_Storage storage);
215 
216  const GA_Defaults &getValueDefaults() const { return myValueDefaults; }
218  { return myValueOperationalDefaults; }
219 
220  /// The size of the data tuple
221  int getDataTupleSize() const { return myTupleSize; }
222 
223  /// Grow or shrink the array size
224  bool setArraySize(GA_Offset new_size) override;
225 
226  /// Try to compress data pages
227  void tryCompressAllPages(
228  GA_Offset start_offset = GA_Offset(0),
229  GA_Offset end_offset = GA_INVALID_OFFSET) override;
230 
231  /// Harden data pages
232  void hardenAllPages(
233  GA_Offset start_offset = GA_Offset(0),
234  GA_Offset end_offset = GA_INVALID_OFFSET) override;
235 
236  /// Returns true iff that is an attribute whose content can be copied
237  /// from this without any type conversions. This is important to
238  /// avoid reallocation of an attribute if its storage type,
239  /// including tuple size, matches the source attribute exactly.
240  bool matchesStorage(const GA_Attribute *that) const override
241  {
242  if (!GA_Attribute::matchesStorage(that))
243  return false;
244  const GA_ATIIndexPair *thatn = UTverify_cast<const GA_ATIIndexPair *>(that);
245  if (getDataStorage() != thatn->getDataStorage())
246  return false;
247  if (myIndexStorage != thatn->myIndexStorage)
248  return false;
249  if (getDataTupleSize() != thatn->getDataTupleSize())
250  return false;
251  if (getEntries() != thatn->getEntries())
252  return false;
253  return true;
254  }
255  /// In the case that we're copying from an attribute whose storage
256  /// type matches this exactly, this function copies the metadata
257  /// not associated with the storage, e.g. myOptions,
258  /// *excluding* the name and the data ID.
259  void copyNonStorageMetadata(const GA_Attribute *that) override;
260 
261  /// This replaces the entirety of this attribute's content and non-
262  /// storage metadata (except the name) with that of the src attribute.
263  /// matchesStorage(src) should already return true.
264  /// This is primarily for use by GA_AttributeSet::replace().
265  /// NOTE: The internal content sizes may not match exactly if the
266  /// attribute type may overallocate, but the sizes should be such
267  /// that any real data will fit in the destination, so be careful
268  /// and deal with the myTailInitialize flag appropriately if
269  /// any extra elements aren't equal to the default.
270  void replace(const GA_Attribute &src) override;
271 
272 protected:
273  int getObjectSetCount() const;
274  void setObjectSetCount(int n);
275 
276  const GA_AIFIndexPairObjects *getObjectsConst(int s = 0) const;
277  GA_AIFIndexPairObjects *getObjects(int s = 0);
278 
279  bool hasSameProperties(const GA_ATIIndexPair *sattrib) const;
280  bool copyProperties(const GA_ATIIndexPair *sattrib);
281  bool mergeObjectValues(const GA_ATIIndexPair *sattrib, UT_IntArray &new_indices);
282 
283  bool setTupleSize(int size);
284  GA_Storage getDataStorage() const { return myDataStorage; }
285 #if GA_INDEX_PAIR_USE_PAGE_ARRAY
286  bool getIndex(GA_Offset ai, int entry, int32 &index) const { index = myIndex[entry]->get<int32>(ai); return true; }
287  bool getData(GA_Offset ai, int entry, fpreal32 &data, int data_component = 0) const { data = myData[entry]->get<fpreal32>(ai, data_component); return true; }
288  bool getData(GA_Offset ai, int entry, fpreal64 &data, int data_component = 0) const { data = myData[entry]->get<fpreal64>(ai, data_component); return true; }
289  bool getData(GA_Offset ai, int entry, int32 &data, int data_component = 0) const { data = myData[entry]->get<int32>(ai, data_component); return true; }
290  bool getData(GA_Offset ai, int entry, int64 &data, int data_component = 0) const { data = myData[entry]->get<int64>(ai, data_component); return true; }
291  bool setIndex(GA_Offset ai, int entry, int32 index) { myIndex[entry]->set(ai, index); return true; }
292  bool setIndex(const GA_Range &ai, int entry, int32 index) { myIndex[entry]->setConstant(ai, index); return true; }
293  bool setData(GA_Offset ai, int entry, fpreal32 data, int data_component = 0) { myData[entry]->set(ai, data_component, data); return true; }
294  bool setData(GA_Offset ai, int entry, fpreal64 data, int data_component = 0) { myData[entry]->set(ai, data_component, data); return true; }
295  bool setData(GA_Offset ai, int entry, int32 data, int data_component = 0) { myData[entry]->set(ai, data_component, data); return true; }
296  bool setData(GA_Offset ai, int entry, int64 data, int data_component = 0) { myData[entry]->set(ai, data_component, data); return true; }
297 #else
298  bool getIndex(GA_Offset ai, int entry, int32 &index) const { myIndex[entry]->get(ai, index); return true; }
299  bool getData(GA_Offset ai, int entry, fpreal32 &data, int data_component = 0) const { myData[entry]->getData(data_component)->get(ai, data); return true; }
300  bool getData(GA_Offset ai, int entry, fpreal64 &data, int data_component = 0) const { myData[entry]->getData(data_component)->get(ai, data); return true; }
301  bool getData(GA_Offset ai, int entry, int32 &data, int data_component = 0) const { myData[entry]->getData(data_component)->get(ai, data); return true; }
302  bool getData(GA_Offset ai, int entry, int64 &data, int data_component = 0) const { myData[entry]->getData(data_component)->get(ai, data); return true; }
303  bool setIndex(GA_Offset ai, int entry, int32 index) { myIndex[entry]->set(ai, index); return true; }
304  bool setIndex(const GA_Range &ai, int entry, int32 index) { myIndex[entry]->set(ai, index); return true; }
305  bool setData(GA_Offset ai, int entry, fpreal32 data, int data_component = 0) { myData[entry]->getData(data_component)->set(ai, data); return true; }
306  bool setData(GA_Offset ai, int entry, fpreal64 data, int data_component = 0) { myData[entry]->getData(data_component)->set(ai, data); return true; }
307  bool setData(GA_Offset ai, int entry, int32 data, int data_component = 0) { myData[entry]->getData(data_component)->set(ai, data); return true; }
308  bool setData(GA_Offset ai, int entry, int64 data, int data_component = 0) { myData[entry]->getData(data_component)->set(ai, data); return true; }
309 #endif
310 
311  bool removeIndex(int index);
312  void invalidateTrailingEntries(GA_Offset ai, int start_entry);
313  void invalidateTrailingEntries(const GA_Range &ai, int start_entry);
314 
315  /// @{
316  /// Copy Data AIF
317  bool copyData(GA_Offset di, const GA_ATIIndexPair &src,
318  GA_Offset si);
319  bool copyData(const GA_Range &di, const GA_ATIIndexPair &src,
320  const GA_Range &si);
321  /// @}
322 
323  /// @{
324  /// Compare AIF
325  bool isAlmostEqual(GA_Offset di, const GA_ATIIndexPair &src,
326  GA_Offset si, int ulps) const;
327  bool isAlmostEqual(const GA_Range &di, const GA_ATIIndexPair &src,
328  const GA_Range &si, int ulps) const;
329  /// @}
330 
331  /// @{ GA_AIFMerge
332  /// Base class implementation of GA_AIFMerge::destroyDestination()
333  void mergeDestroyDestination(const GA_MergeMap &map,
334  GA_Attribute *dattrib) const;
335  /// Base class implementation of GA_AIFMerge::addDestination()
336  GA_Attribute *mergeAddDestination(const GA_MergeMap &map,
337  GA_Attribute *dattrib) const;
338  /// Base class implementation of GA_AIFMerge::copyArray()
339  bool mergeAppendData(const GA_MergeMap &map,
340  const GA_Attribute *sattrib);
341  /// @}
342 
343  /// @{
344  /// GA_AIFTuple
345  /// The AIFTuple has a tuple with 2*getEntries() entries. The entries are
346  /// interleaved with ( index0, value0, index1, value1, ...)
347  int tupleGetSize() const
348  { return (myTupleSize + 1) * getEntries(); }
349  bool tupleSetSize(int size);
350  GA_Storage tupleGetStorage() const;
351  bool tupleSetStorage(GA_Storage storage);
352  bool isNan(GA_Offset ai) const;
353  bool isNan(const GA_Range &ai) const;
354  template <typename T> inline bool
355  tupleGet(GA_Offset ai, T &v, int index) const;
356  template <typename T> inline bool
357  tupleGet(GA_Offset ai, T *v, int count, int start) const;
358  template <typename T> inline bool
359  tupleSet(GA_Offset ai, T v, int vi);
360  template <typename T> inline bool
361  tupleSet(GA_Offset ai, const T *v, int count, int start);
362  template <typename T> inline bool
363  tupleSet(const GA_Range &di, T v, int vi);
364  template <typename T> inline bool
365  tupleSet(const GA_Range &di, const T *v, int count, int start);
366  inline bool tupleSet(GA_Offset di, const GA_ATIIndexPair &s,
367  GA_Offset si, int component);
368  inline bool tupleSet(const GA_Range &di, const GA_ATIIndexPair &s,
369  const GA_Range &si, int component);
370  /// @}
371 
372 protected:
373  // Protected Data
374  ga_IndexPairObjectSets *myObjects;
375 #if GA_INDEX_PAIR_USE_PAGE_ARRAY
376  UT_ConcurrentVector<GA_PageArray<void,1> *> myIndex;
377  UT_ConcurrentVector<GA_PageArray<> *> myData;
378 #else
379  UT_ConcurrentVector<GA_DataArray *> myIndex;
380  UT_ConcurrentVector<GA_DataArrayTuple *> myData;
381 #endif
382 
383  /// The tuple size of each GA_PageArray in myData.
384  /// At the moment, this is normally 1, but is 3 for the CAPTURE_WIRE
385  /// (wireCapture) case. The other cases are CAPTURE_BONE (boneCapture),
386  /// CAPTURE_META (metaCapture), CAPTURE_CLOTH (clothCapture), and
387  /// CAPTURE_MUSCLE (muscleCapture).
389 
397 
398  /// Scale all weights by the given amount (used in weighted sums)
399  void interpScale(GA_Offset di, fpreal scale);
400 
401 private:
402  GA_Attribute *doClone(const GA_IndexMap &index_map,
403  const UT_StringHolder &name) const override;
404 
405  /// @{ GA_AIFJSON
406  bool jsonSave(UT_JSONWriter &w, const GA_SaveMap &s) const;
407  bool jsonLoad(UT_JSONParser &p, const GA_LoadMap &l);
408  /// @}
409 
410  static GA_AIFIndexPair *myAIFPair;
411  static GA_AIFMerge *myAIFMerge;
412  static GA_AIFCopyData *myAIFCopyData;
413  static GA_AIFEdit *myAIFEdit;
414  static GA_AIFJSON *myAIFJSON;
415  static GA_AIFTuple *myAIFTuple;
416  static GA_AIFMath *myAIFMath;
417  static GA_AIFInterp *myAIFInterp;
418  static GA_AIFCompare *myAIFCompare;
419 
420  static const GA_AttributeType *theAttributeType;
421 
422  /// @cond INTERNAL_DOX
423  friend class ga_IndexPairAccess;
424  friend class ga_IndexPairMerge;
425  friend class ga_IndexPairEdit;
426  friend class ga_IndexPairEditDelta;
427  friend class ga_IndexPairEditSnapshot;
428  friend class ga_IndexPairJSON;
429  friend class ga_IndexPairTuple;
430  friend class ga_IndexPairMath;
431  friend class ga_IndexPairInterp;
432  friend class ga_IndexPairCopyData;
433  friend class ga_IndexPairCompare;
434  /// @endcond
435 };
436 
437 #endif
438 
A class to manage an ordered array which has fixed offset handles.
Definition: GA_IndexMap.h:63
SYS_AtomicInt32 myEntryCapacity
Definition of a geometry attribute.
Definition: GA_Attribute.h:198
UT_ConcurrentVector< GA_DataArrayTuple * > myData
int int32
Definition: SYS_Types.h:39
Generic Attribute Interface class to get/set data as index pairs.
Used to pass options and map offset values during saving.
Definition: GA_SaveMap.h:48
bool getData(GA_Offset ai, int entry, int64 &data, int data_component=0) const
Class which stores the default values for a GA_Attribute.
Definition: GA_Defaults.h:35
GA_Storage getDataStorage() const
getFileOption("OpenEXR:storage") storage
Definition: HDK_Image.dox:276
Attribute Interface class to perform numeric operations on attributes.
Definition: GA_AIFMath.h:88
const GLdouble * v
Definition: glcorearb.h:837
static SYS_FORCE_INLINE const GA_AttributeType & getType()
GLuint start
Definition: glcorearb.h:475
const GA_Defaults & getValueDefaults() const
The merge map keeps track of information when merging details.
Definition: GA_MergeMap.h:53
virtual void reconstructElementBlock(GA_Offset offset, GA_Offset nelements)=0
const GA_AIFIndexPair * getAIFIndexPair() const override
Return the attribute's index pair interface or NULL.
GLdouble s
Definition: glad.h:3009
JSON reader class which handles parsing of JSON or bJSON files.
Definition: UT_JSONParser.h:87
virtual bool setArraySize(GA_Offset size)=0
const GA_AIFTuple * getAIFTuple() const override
Return the attribute's tuple interface or NULL.
bool setIndex(const GA_Range &ai, int entry, int32 index)
#define GA_API
Definition: GA_API.h:14
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:37
SYS_FORCE_INLINE TO_T UTverify_cast(FROM_T from)
Definition: UT_Assert.h:229
virtual void countMemory(UT_MemoryCounter &counter, bool inclusive) const =0
int getDataTupleSize() const
The size of the data tuple.
virtual int64 getMemoryUsage(bool inclusive) const =0
virtual bool matchesStorage(const GA_Attribute *that) const
Definition: GA_Attribute.h:764
bool setData(GA_Offset ai, int entry, int64 data, int data_component=0)
UT_ConcurrentVector< GA_DataArray * > myIndex
float fpreal32
Definition: SYS_Types.h:200
virtual void tryCompressAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
GA_Defaults myValueDefaults
const GA_AIFEdit * getAIFEdit() const override
Return the attribute's edit interface or NULL.
int tupleGetSize() const
SYS_FORCE_INLINE const GA_AttributeType & getType() const
Definition: GA_Attribute.h:206
const GA_AIFJSON * getAIFJSON() const override
#define GA_INVALID_OFFSET
Definition: GA_Types.h:687
static SYS_FORCE_INLINE const GA_ATIIndexPair * cast(const GA_Attribute *attrib)
GA_Storage myDataStorage
A range of elements in an index-map.
Definition: GA_Range.h:42
GA_Defaults myValueOperationalDefaults
double fpreal64
Definition: SYS_Types.h:201
GA_Size GA_Offset
Definition: GA_Types.h:646
GA_API const UT_StringHolder scale
const GA_Defaults & getValueOperationalDefaults() const
GA_AttributeScope
Definition: GA_Types.h:143
GLdouble n
Definition: glcorearb.h:2008
static SYS_FORCE_INLINE GA_ATIIndexPair * cast(GA_Attribute *attrib)
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
GLintptr offset
Definition: glcorearb.h:665
const GA_AIFMerge * getAIFMerge() const override
Return the attribute's merge interface or NULL.
bool setData(GA_Offset ai, int entry, fpreal32 data, int data_component=0)
int getEntries() const
virtual void replace(const GA_Attribute &src)=0
Attribute Interface for merging attribute data between details.
Definition: GA_AIFMerge.h:56
GA_Defaults myIndexDefault
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
bool getData(GA_Offset ai, int entry, int32 &data, int data_component=0) const
ga_IndexPairObjectSets * myObjects
bool isNan(const float x)
Return true if x is a NaN (Not-A-Number) value.
Definition: Math.h:395
long long int64
Definition: SYS_Types.h:116
Attribute Interface class to perform comparisons on attributes.
Definition: GA_AIFCompare.h:27
Options during loading.
Definition: GA_LoadMap.h:42
Defragmentation of IndexMaps.
Definition: GA_Defragment.h:45
const GA_AIFInterp * getAIFInterp() const override
Return the attribute's interpolation interface or NULL.
WriteConcurrence getSupportedWriteConcurrence() const override
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual void copyNonStorageMetadata(const GA_Attribute *that)
Definition: GA_Attribute.h:778
static SYS_FORCE_INLINE const UT_StringHolder & getTypeName()
bool setData(GA_Offset ai, int entry, int32 data, int data_component=0)
bool matchesStorage(const GA_Attribute *that) const override
const GA_AIFMath * getAIFMath() const override
Return the attribute's math interface or NULL.
static SYS_FORCE_INLINE bool isType(const GA_Attribute *attrib)
bool setIndex(GA_Offset ai, int entry, int32 index)
GLsizeiptr size
Definition: glcorearb.h:664
const GA_AIFCopyData * getAIFCopyData() const override
Return the attribute's copy interface or NULL.
fpreal64 fpreal
Definition: SYS_Types.h:278
bool getData(GA_Offset ai, int entry, fpreal64 &data, int data_component=0) const
GLuint index
Definition: glcorearb.h:786
bool setData(GA_Offset ai, int entry, fpreal64 data, int data_component=0)
bool getIndex(GA_Offset ai, int entry, int32 &index) const
Concurrent writes to separate pages supported.
Definition: GA_Attribute.h:367
const GA_AIFCompare * getAIFCompare() const override
Return the attribute's comparison interface or NULL.
Attribute Interface class to copy attribute data.
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
Attribute Interface for file I/O.
Definition: GA_AIFJSON.h:39
UT_Lock myEntryGrowthLock
AIF to record changes to attribute values.
Definition: GA_AIFEdit.h:397
virtual void hardenAllPages(GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)=0
virtual void defragment(const GA_Defragment &defrag)=0
Generic Attribute Interface class to access an attribute as a tuple.
Definition: GA_AIFTuple.h:32
bool getData(GA_Offset ai, int entry, fpreal32 &data, int data_component=0) const
GA_Storage
Definition: GA_Types.h:51
GA_Storage myIndexStorage
GLint GLsizei count
Definition: glcorearb.h:405
Definition: format.h:1821
GLenum src
Definition: glcorearb.h:1793