HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_DataArray.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_DataArray.h ( GA Library, C++)
7  *
8  * COMMENTS: A very simple array used to store attribute data. Some areas
9  * of the array may be "vacant".
10  */
11 
12 #pragma once
13 
14 #ifndef __GA_DataArray__
15 #define __GA_DataArray__
16 
17 #include "GA_API.h"
18 #include "GA_Types.h"
19 #include <UT/UT_VectorTypes.h>
20 #include <SYS/SYS_Types.h>
21 
22 
23 class GA_Attribute;
24 class GA_Defragment;
25 class GA_LoadMap;
26 class GA_MergeMap;
27 class GA_MergeOffsetMap;
28 class GA_Range;
29 class UT_BitArray;
30 class UT_JSONParser;
31 class UT_JSONWriter;
32 class UT_MemoryCounter;
33 template <typename T> class UT_Array;
34 template <typename T> class UT_ValArray;
35 
36 class ga_PageTableBase;
37 namespace GA_Private { class ga_PageTableBaseImpl; }
38 
39 
40 /// @brief An array of numbers with various storage types.
41 ///
42 /// GA_DataArray provides a way of storing arrays of scalar values. The array
43 /// can have various storage types from 8-bit integer to 64-bit reals.
44 ///
45 /// There are basic operations on the array.
46 ///
47 /// See also: @ref JSON-GA_DataArray
48 ///
50 {
51 public:
53  GA_DataArray(GA_Storage storage, GA_Offset size, fpreal value);
54  /// Creates a shared array if slice is other than 0. You must
55  /// invoke shareData() on the resulting data to steal the 0th entries
56  /// data tables.
57  GA_DataArray(GA_Storage storage, GA_Offset size, int slice, UT_Vector3D value);
59  ~GA_DataArray();
60 
61  GA_DataArray &operator=(const GA_DataArray &src);
62 
63  /// Report memory usage
64  int64 getMemoryUsage(bool inclusive) const;
65 
66  /// Count memory usage using a UT_MemoryCounter in order to count
67  /// shared memory correctly.
68  /// If inclusive is true, the size of this object is counted,
69  /// else only memory owned by this object is counted.
70  /// If this is pointed to by the calling object, inclusive should be true.
71  /// If this is contained in the calling object, inclusive should be false.
72  /// (Its memory was already counted in the size of the calling object.)
73  void countMemory(UT_MemoryCounter &counter, bool inclusive) const;
74 
75  /// Change the size of the array
76  /// If the array is packed, this must only be invoked on the 0th
77  /// array, and the other shared arrays must be updated by calling
78  /// shareData()
79  void setArraySize(GA_Offset size);
80 
81  /// Query the size of the array
82  GA_Offset getArraySize() const { return mySize; }
83 
84  /// Query the storage used for the array data.
85  GA_Storage getStorage() const { return myStorage; }
86 
87  /// Changes all values back to their defaults
88  /// Ignored for shared arrays.
89  void clear();
90 
91  /// Clears a specific value to the default
92  void clearOffset(GA_Offset off, GA_Offset num);
93 
94  /// Makes the array constant.
95  void makeConstant(int32 val);
96  void makeConstant(int64 val);
97  void makeConstant(fpreal32 val);
98  void makeConstant(fpreal64 val);
99  void makeVector3Constant(const int32 *val);
100  void makeVector3Constant(const int64 *val);
101  void makeVector3Constant(const fpreal32 *val);
102  void makeVector3Constant(const fpreal64 *val);
103 
104  /// We can have multiple data arrays refer to the same structure
105  /// with different slice/vectorsizes. The 0th is always the true owner
106  /// the rest need to do a shareData to track any changes.
107  void shareData(GA_DataArray *src);
108 
109  /// mergeGrowArrayAndCopy() is called to grow the data array while copying
110  /// data from the source.
111  /// If the array is packed, this must only be invoked on the 0th
112  /// array, and the other shared arrays must be updated by calling
113  /// shareData()
114  void mergeGrowArrayAndCopy(const GA_MergeMap &map,
115  GA_AttributeOwner owner,
116  const GA_DataArray &src);
117 
118  /// @{
119  /// Access data from the array
120  int32 getI32(GA_Offset idx) const;
121  int64 getI64(GA_Offset idx) const;
122  fpreal16 getF16(GA_Offset idx) const;
123  fpreal32 getF32(GA_Offset idx) const;
124  fpreal64 getF64(GA_Offset idx) const;
125  fpreal getF(GA_Offset idx) const
126  { return getF64(idx); }
127  void get(GA_Offset idx, int32 &v) const { v = getI32(idx); }
128  void get(GA_Offset idx, int64 &v) const { v = getI64(idx); }
129  void get(GA_Offset idx, fpreal32 &v) const { v = getF32(idx); }
130  void get(GA_Offset idx, fpreal64 &v) const { v = getF64(idx); }
131  /// @}
132 
133  // Access a range of values from the array
134  void get(GA_Offset start, GA_Offset end, int32 *v, int step=1) const;
135  void get(GA_Offset start, GA_Offset end, int64 *v, int step=1) const;
136  void get(GA_Offset start, GA_Offset end, fpreal32 *v, int step=1) const;
137  void get(GA_Offset start, GA_Offset end, fpreal64 *v, int step=1) const;
138 
139  /// Set the value at a particular index
140  void set(GA_Offset di, int32 val);
141  void set(GA_Offset di, int64 val);
142  void set(GA_Offset di, fpreal32 val);
143  void set(GA_Offset di, fpreal64 val);
144  void set(const GA_Range &di, int32 val);
145  void set(const GA_Range &di, int64 val);
146  void set(const GA_Range &di, fpreal32 val);
147  void set(const GA_Range &di, fpreal64 val);
148 
149  // Only to be used on vector3 arrays!
150  void setVector3(const GA_Range &di, const int32 *val);
151  void setVector3(const GA_Range &di, const int64 *val);
152  void setVector3(const GA_Range &di, const fpreal32 *val);
153  void setVector3(const GA_Range &di, const fpreal64 *val);
154 
155  void set(GA_Offset di, const GA_DataArray &src, GA_Offset si);
156  void set(const GA_Range &di, const GA_DataArray &src, GA_Offset si);
157  void set(const GA_Range &di, const GA_DataArray &src);
158  void set(const GA_Range &di, const GA_DataArray &src, const GA_Range &si);
159 
160  /// Set a range of values in the array
161  void set(GA_Offset start, GA_Offset end, const int32 *v, int step=1);
162  void set(GA_Offset start, GA_Offset end, const int64 *v, int step=1);
163  void set(GA_Offset start, GA_Offset end, const fpreal32 *v, int step=1);
164  void set(GA_Offset start, GA_Offset end, const fpreal64 *v, int step=1);
165 
166  /// Set the value for a tuple of data array from a source tuple.
167  static void setTuple(GA_DataArray *const* dest, const GA_Range &di,
168  const GA_DataArray *const* src,
169  int tuple_size);
170  static void setTuple(GA_DataArray *const* dest, const GA_Range &di,
171  const GA_DataArray *const* src,
172  const GA_Range &si, int tuple_size);
173  static void setTuple(GA_DataArray *const* dest,
174  const GA_DataArray *const* src,
175  const GA_Range &si,
176  const GA_MergeOffsetMap &map, int tuple_size);
177 
178  /// Reset the value at a particular index to its default.
179  void reset(GA_Offset di);
180  void reset(const GA_Range &di);
181 
182  /// @{
183  /// Interface for defragmentation
184  void swapRange(GA_Offset a, GA_Offset b, GA_Size n);
185  void moveRange(GA_Offset src, GA_Offset dst, GA_Size n);
186  void defragment(const GA_Defragment &defrag);
187  /// @}
188 
189  /// @{
190  /// Test for NAN's
191  bool isNan(GA_Offset ai) const;
192  bool isNan(const GA_Range &di) const;
193  /// @}
194 
195  /// Integer values in the array are re-mapped to the values stored in the
196  /// map.
197  /// @code
198  /// for (GA_Iterator it(di); !it.atEnd(); ++it) {
199  /// idx = array[it];
200  /// array[it] = idx < 0 || idx >= map.entries() ? invalid : map(idx);
201  /// }
202  /// @endcode
203  void xlate(const GA_Range &di, const UT_IntArray &map, int64 invalid=-1);
204  /// Save data to a JSON stream.
205  /// @section JSON-GA_DataArray JSON Schema: GA_DataArray
206  /// @code
207  /// {
208  /// "name" : "GA_DataArray",
209  /// "description" : "An array of numbers",
210  /// "type" : "array",
211  /// "items" : "number",
212  /// }
213  /// @endcode
214  /// @see @ref JSON_FileFormat
215  bool jsonSave(UT_JSONWriter &w, const GA_Range &it) const;
216 
217  /// Load from a JSON stream.
218  bool jsonLoad(UT_JSONParser &p,
219  const GA_LoadMap &map, GA_AttributeOwner owner);
220 
221  /// Save with an integer translation. This method is just like the
222  /// standard jsonSave() method. However each value is used as an index
223  /// into the integer array. The value stored in the array is written
224  /// instead of the raw value.
225  /// @code
226  /// for (GA_Iterator it(range); !it.atEnd(); ++it) {
227  /// idx = getInteger(it.getOffset());
228  /// json.write( idx < 0 || idx >= map.entries() ? -1 : map(idx) );
229  /// }
230  /// @endcode
231  bool jsonSave(UT_JSONWriter &w, const GA_Range &range,
232  const UT_IntArray *map, int defvalue=-1) const;
233 
234  // Return whether the attribute storage & size match
235  inline bool isSameType(const GA_DataArray &b) const
236  {
237  return myStorage == b.myStorage && mySize == b.mySize;
238  }
239 
240  /// Marshall a bit array indicating which output pages are constant given
241  /// the internal page mapping. The mapping consists of a list of internal
242  /// pages with the start of each output page indicated by a negative value,
243  /// (-(internal_page + 1)).
244  ///
245  /// This method considers any internal pages not already marked constant as
246  /// varying.
247  ///
248  /// Returns the total number of constant output pages.
249  GA_Size marshallConstantFlagsForOutputPagesFast(
250  const UT_ValArray<GA_PageNum> &internal_page_map,
251  UT_BitArray &constant_flags) const;
252 
253  /// Marshall a bit array indicating which output pages are constant given
254  /// the internal page mapping. The mapping consists of a list of internal
255  /// sub-page blocks with the start of each output page indicated by a
256  /// negative page number (-(internal_page + 1)).
257  ///
258  /// This method traverses any varying internal pages to detect whether an
259  /// output page will be constant.
260  ///
261  /// Returns the total number of constant output pages.
263  {
264  public:
267  : myPage(page), myStartOffset(start), myEndOffset(end) {}
268 
272  };
273  GA_Size marshallConstantFlagsForOutputPagesSlow(
274  const UT_Array<ga_SubPageBlock> &internal_page_map,
275  UT_BitArray &constant_flags) const;
276 
277 
278  /// @cond INTERNAL
279  const ga_PageTableBase *getPageTable() const { return myPageTable; }
280  ga_PageTableBase *getPageTable() { return myPageTable; }
282  *getPageTableImpl();
283  /// @endcond
284 
285  /// @{
286  /// Direct access to compound objects.
287  template <typename DESTTYPE, typename MYTYPE>
288  static DESTTYPE directGetterScalar(const GA_DataArray *const* data,
289  GA_Offset off, int comp);
290  template <typename SRCTYPE, typename MYTYPE>
291  static void directSetterScalar(GA_DataArray *const* data,
292  GA_Offset off, int comp, SRCTYPE val);
293  template <typename SRCTYPE, typename MYTYPE>
294  static void directAdderScalar(GA_DataArray *const* data,
295  GA_Offset off, int comp, SRCTYPE val);
296  template <typename DESTTYPE, typename MYTYPE>
297  static void directGetterVector(DESTTYPE &value,
298  const GA_DataArray *const* data,
299  GA_Offset off);
300  template <typename SRCTYPE, typename MYTYPE>
301  static void directSetterVector(GA_DataArray *const* data,
302  GA_Offset off, const SRCTYPE &val);
303  template <typename SRCTYPE, typename MYTYPE>
304  static void directAdderVector(GA_DataArray *const* data,
305  GA_Offset off, const SRCTYPE &val);
306 
307  template <typename DESTTYPE, typename MYTYPE>
308  static DESTTYPE directVector3GetterScalar(const GA_DataArray *const *d,
309  GA_Offset off, int comp);
310  template <typename SRCTYPE, typename MYTYPE>
311  static void directVector3SetterScalar(GA_DataArray *const* data,
312  GA_Offset off, int comp,
313  SRCTYPE val);
314  template <typename SRCTYPE, typename MYTYPE>
315  static void directVector3AdderScalar(GA_DataArray *const *data,
316  GA_Offset off, int comp,
317  SRCTYPE val);
318  template <typename DESTTYPE, typename MYTYPE>
319  static void directVector3GetterVector(DESTTYPE &value,
320  const GA_DataArray *const* data,
321  GA_Offset off);
322  template <typename SRCTYPE, typename MYTYPE>
323  static void directVector3SetterVector(GA_DataArray *const* data,
324  GA_Offset off,const SRCTYPE &val);
325  template <typename SRCTYPE, typename MYTYPE>
326  static void directVector3AdderVector(GA_DataArray *const* data,
327  GA_Offset off, const SRCTYPE &val);
328 
329  // Page access methods
330  template <typename T, typename BASETYPE, typename MYTYPE, bool READONLY>
331  static T *directPageGetterVary(
332  GA_DataArray *const* data, T *marshall, GA_Offset off, int comp, bool &isconstant);
333  template <typename T, typename BASETYPE, int TUPLE_SIZE, typename MYTYPE, bool READONLY>
334  static T *directVector3PageGetterVary(
335  GA_DataArray *const* data, T *marshall, GA_Offset off, int comp, bool &isconstant);
336  template <typename T, typename BASETYPE, typename MYTYPE>
337  static T *directPageGetter(
338  GA_DataArray *const* data, T *marshall, GA_Offset off, int comp, bool &isconstant);
339  template <typename T, typename BASETYPE, typename MYTYPE>
340  static T *directVector3PageGetter(
341  GA_DataArray *const* data, T *marshall, GA_Offset off, int comp, bool &isconstant);
342  template <typename T, typename BASETYPE, typename MYTYPE>
343  static T *directPageGetterRO(
344  const GA_DataArray *const* data, T *marshall, GA_Offset off, int comp, bool &isconstant);
345  template <typename T, typename BASETYPE, typename MYTYPE>
346  static T *directVector3PageGetterRO(
347  const GA_DataArray *const* data, T *marshall, GA_Offset off, int comp, bool &isconstant);
348  template <typename T, typename BASETYPE, int TUPLE_SIZE, typename MYTYPE>
349  static void directVector3PageSetterVary(GA_DataArray *const* data, const T *srcdata, GA_Offset off, int comp);
350  template <typename T, typename BASETYPE, typename MYTYPE>
351  static void directPageSetter(GA_DataArray *const* data, const T *srcdata, GA_Offset off, int comp);
352  template <typename T, typename BASETYPE, typename MYTYPE>
353  static void directVector3PageSetter(GA_DataArray *const* data, const T *srcdata, GA_Offset off, int comp);
354  /// @}
355 
356  /// @{
357  /// Helper class for wrapping all direct access methods in a version that
358  /// takes an attribute pointer. The provided base class must provide two
359  /// static conversion methos:
360  /// static const GA_DataArray *const* getData(const GA_Attribute *);
361  /// static GA_DataArray *const* getData(GA_Attribute *);
362  template <typename BASE>
363  class directAttributeAdapter : public BASE
364  {
365  public:
366  /// Direct access to compound objects.
367  template <typename DESTTYPE, typename MYTYPE>
368  static DESTTYPE directGetterScalar(const GA_Attribute *atr,
369  GA_Offset off, int comp)
370  {
371  return GA_DataArray::directGetterScalar<DESTTYPE, MYTYPE>(
372  BASE::getData(atr), off, comp);
373  }
374  template <typename SRCTYPE, typename MYTYPE>
376  GA_Offset off, int comp, SRCTYPE val)
377  {
378  GA_DataArray::directSetterScalar<SRCTYPE, MYTYPE>(
379  BASE::getData(atr), off, comp, val);
380  }
381  template <typename SRCTYPE, typename MYTYPE>
382  static void directAdderScalar(GA_Attribute *atr,
383  GA_Offset off, int comp, SRCTYPE val)
384  {
385  GA_DataArray::directAdderScalar<SRCTYPE, MYTYPE>(
386  BASE::getData(atr), off, comp, val);
387  }
388  template <typename DESTTYPE, typename MYTYPE>
389  static void directGetterVector(DESTTYPE &value, const GA_Attribute *atr,
390  GA_Offset off)
391  {
392  GA_DataArray::directGetterVector<DESTTYPE, MYTYPE>(
393  value, BASE::getData(atr), off);
394  }
395  template <typename SRCTYPE, typename MYTYPE>
396  static void directSetterVector(GA_Attribute *atr,
397  GA_Offset off, const SRCTYPE &val)
398  {
399  GA_DataArray::directSetterVector<SRCTYPE, MYTYPE>(
400  BASE::getData(atr), off, val);
401  }
402  template <typename SRCTYPE, typename MYTYPE>
403  static void directAdderVector(GA_Attribute *atr,
404  GA_Offset off, const SRCTYPE &val)
405  {
406  GA_DataArray::directAdderVector<SRCTYPE, MYTYPE>(
407  BASE::getData(atr), off, val);
408  }
409 
410  template <typename DESTTYPE, typename MYTYPE>
411  static DESTTYPE directVector3GetterScalar(const GA_Attribute *atr,
412  GA_Offset off, int comp)
413  {
414  return GA_DataArray::directVector3GetterScalar<DESTTYPE, MYTYPE>
415  (BASE::getData(atr), off, comp);
416  }
417  template <typename SRCTYPE, typename MYTYPE>
419  GA_Offset off, int comp,
420  SRCTYPE val)
421  {
422  GA_DataArray::directVector3SetterScalar<SRCTYPE, MYTYPE>(
423  BASE::getData(atr), off, comp, val);
424  }
425  template <typename SRCTYPE, typename MYTYPE>
427  GA_Offset off, int comp,
428  SRCTYPE val)
429  {
430  GA_DataArray::directVector3AdderScalar<SRCTYPE, MYTYPE>(
431  BASE::getData(atr), off, comp, val);
432  }
433  template <typename DESTTYPE, typename MYTYPE>
434  static void directVector3GetterVector(DESTTYPE &value,
435  const GA_Attribute *atr,
436  GA_Offset off)
437  {
438  GA_DataArray::directVector3GetterVector<DESTTYPE, MYTYPE>(
439  value, BASE::getData(atr), off);
440  }
441  template <typename SRCTYPE, typename MYTYPE>
443  GA_Offset off,const SRCTYPE &val)
444  {
445  GA_DataArray::directVector3SetterVector<SRCTYPE, MYTYPE>(
446  BASE::getData(atr), off, val);
447  }
448  template <typename SRCTYPE, typename MYTYPE>
450  GA_Offset off, const SRCTYPE &val)
451  {
452  GA_DataArray::directVector3AdderVector<SRCTYPE, MYTYPE>(
453  BASE::getData(atr), off, val);
454  }
455  // Page access methods
456  template <typename T, typename BASETYPE, typename MYTYPE>
458  GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
459  {
460  return GA_DataArray::directPageGetter<T, BASETYPE, MYTYPE>(
461  BASE::getData(atr), marshall, off, comp, isconstant);
462  }
463  template <typename T, typename BASETYPE, typename MYTYPE>
465  GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
466  {
467  return GA_DataArray::directVector3PageGetter<T, BASETYPE, MYTYPE>(
468  BASE::getData(atr), marshall, off, comp, isconstant);
469  }
470  template <typename T, typename BASETYPE, typename MYTYPE>
472  const GA_Attribute *atr, T *marshall,
473  GA_Offset off, int comp, bool &isconstant)
474  {
475  return GA_DataArray::directPageGetterRO<T, BASETYPE, MYTYPE>(
476  BASE::getData(atr), marshall, off, comp, isconstant);
477  }
478  template <typename T, typename BASETYPE, typename MYTYPE>
480  const GA_Attribute *atr, T *marshall,
481  GA_Offset off, int comp, bool &isconstant)
482  {
483  return GA_DataArray::directVector3PageGetterRO<T, BASETYPE, MYTYPE>(
484  BASE::getData(atr), marshall, off, comp, isconstant);
485  }
486  template <typename T, typename BASETYPE, typename MYTYPE>
487  static void directPageSetter(GA_Attribute *atr,
488  const T *srcdata, GA_Offset off, int comp)
489  {
490  GA_DataArray::directPageSetter<T, BASETYPE, MYTYPE>(
491  BASE::getData(atr), srcdata, off, comp);
492  }
493  template <typename T, typename BASETYPE, typename MYTYPE>
495  const T *srcdata, GA_Offset off,
496  int comp)
497  {
498  GA_DataArray::directVector3PageSetter<T, BASETYPE, MYTYPE>(
499  BASE::getData(atr), srcdata, off, comp);
500  }
501  };
502  /// @}
503 
504  // Sets bits for all pages with differing values.
505  void comparePages(UT_BitArray &pages, const GA_DataArray &other) const;
506 
507  /// Try to compress data pages
508  /// Will try to compress *all* pages overlapping the specified offset range.
509  void tryCompressAllPages(GA_Offset start_offset = GA_Offset(0),
510  GA_Offset end_offset = GA_INVALID_OFFSET);
511  /// Compresses a specific page.
512  /// Pass in the offset whose page you wish to compress, *not*
513  /// the page id.
514  void tryCompressSinglePage(GA_Offset pageoffset);
515  /// Harden data pages
516  /// Will harden *all* pages overlapping the specified offset range.
517  void hardenAllPages(GA_Offset start_offset = GA_Offset(0),
518  GA_Offset end_offset = GA_INVALID_OFFSET);
519 
520  /// Remaps all numbers through the lookup table. Negative numbers
521  /// get mapped to -1. Counts the number of occurrences of each
522  /// number in the counter, which should be pre-allocated to your
523  /// maximum size.
524  /// Inclusive
525  /// count measures the *source* indices, not destination.
526  void remapAndCount(GA_Offset start_offset,
527  GA_Offset end_offset,
528  const UT_IntArray &old2new,
529  UT_IntArray &count);
530 
531 private:
532  template <typename T, typename TB>
533  static bool nativeSetFullTuple(GA_DataArray *const* dest,
534  const GA_Range &di,
535  const GA_DataArray *const* src,
536  int tuple_size);
537  template <typename T, typename TB>
538  static bool nativeSetFullTuple(GA_DataArray *const* dest,
539  const GA_Range &di,
540  const GA_DataArray *const* src,
541  const GA_Range &si,
542  int tuple_size);
543  template <typename T, typename TB, int VECTORSIZE>
544  bool nativeSetDispatch(const GA_Range &di, const GA_DataArray &src,
545  const GA_Range &si);
546  template <typename T, typename TB, int VECTORSIZE,
547  typename S_T, typename S_TB, int S_VECTORSIZE>
548  bool nativeSet(const GA_Range &di, const GA_DataArray &src,
549  const GA_Range &si);
550 
551 private:
552  ga_PageTableBase *myPageTable;
553  GA_Offset mySize;
554  GA_Storage myStorage;
555  int mySlice, myVectorSize;
556 };
557 
558 #endif
Definition of a geometry attribute.
Definition: GA_Attribute.h:198
static void directAdderVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
Definition: GA_DataArray.h:403
int int32
Definition: SYS_Types.h:39
GLenum GLint * range
Definition: glcorearb.h:1925
GA_Size GA_PageOff
Definition: GA_Types.h:650
static void directGetterVector(DESTTYPE &value, const GA_Attribute *atr, GA_Offset off)
Definition: GA_DataArray.h:389
getFileOption("OpenEXR:storage") storage
Definition: HDK_Image.dox:276
const GLdouble * v
Definition: glcorearb.h:837
static void directVector3AdderVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
Definition: GA_DataArray.h:449
GLuint start
Definition: glcorearb.h:475
GLsizei const GLfloat * value
Definition: glcorearb.h:824
ga_SubPageBlock(GA_PageNum page, GA_PageOff start, GA_PageOff end)
Definition: GA_DataArray.h:266
static void directVector3GetterVector(DESTTYPE &value, const GA_Attribute *atr, GA_Offset off)
Definition: GA_DataArray.h:434
GA_Storage getStorage() const
Query the storage used for the array data.
Definition: GA_DataArray.h:85
The merge map keeps track of information when merging details.
Definition: GA_MergeMap.h:53
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
static void directVector3SetterVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
Definition: GA_DataArray.h:442
bool isSameType(const GA_DataArray &b) const
Definition: GA_DataArray.h:235
JSON reader class which handles parsing of JSON or bJSON files.
Definition: UT_JSONParser.h:87
static void directSetterVector(GA_Attribute *atr, GA_Offset off, const SRCTYPE &val)
Definition: GA_DataArray.h:396
#define GA_API
Definition: GA_API.h:14
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:37
float fpreal32
Definition: SYS_Types.h:200
static T * directVector3PageGetterRO(const GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
Definition: GA_DataArray.h:479
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
GA_Offset getArraySize() const
Query the size of the array.
Definition: GA_DataArray.h:82
#define GA_INVALID_OFFSET
Definition: GA_Types.h:687
A range of elements in an index-map.
Definition: GA_Range.h:42
static void directVector3PageSetter(GA_Attribute *atr, const T *srcdata, GA_Offset off, int comp)
Definition: GA_DataArray.h:494
static T * directVector3PageGetter(GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
Definition: GA_DataArray.h:464
double fpreal64
Definition: SYS_Types.h:201
GA_Size GA_Offset
Definition: GA_Types.h:646
GLdouble n
Definition: glcorearb.h:2008
fpreal getF(GA_Offset idx) const
Definition: GA_DataArray.h:125
GLboolean reset
Definition: glad.h:5138
static T * directPageGetterRO(const GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
Definition: GA_DataArray.h:471
static DESTTYPE directVector3GetterScalar(const GA_Attribute *atr, GA_Offset off, int comp)
Definition: GA_DataArray.h:411
GLuint GLuint end
Definition: glcorearb.h:475
static void directVector3AdderScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)
Definition: GA_DataArray.h:426
Keeps track of offset mapping when merging index lists.
static DESTTYPE directGetterScalar(const GA_Attribute *atr, GA_Offset off, int comp)
Direct access to compound objects.
Definition: GA_DataArray.h:368
An array of numbers with various storage types.
Definition: GA_DataArray.h:49
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
static void directVector3SetterScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)
Definition: GA_DataArray.h:418
Options during loading.
Definition: GA_LoadMap.h:42
Defragmentation of IndexMaps.
Definition: GA_Defragment.h:45
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GLsizeiptr size
Definition: glcorearb.h:664
GLenum GLenum dst
Definition: glcorearb.h:1793
GA_AttributeOwner
Definition: GA_Types.h:35
static T * directPageGetter(GA_Attribute *atr, T *marshall, GA_Offset off, int comp, bool &isconstant)
Definition: GA_DataArray.h:457
fpreal64 fpreal
Definition: SYS_Types.h:277
LeafData & operator=(const LeafData &)=delete
GA_Size GA_PageNum
Definition: GA_Types.h:649
static void directPageSetter(GA_Attribute *atr, const T *srcdata, GA_Offset off, int comp)
Definition: GA_DataArray.h:487
GLuint GLfloat * val
Definition: glcorearb.h:1608
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:857
Definition: core.h:1131
static void directSetterScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)
Definition: GA_DataArray.h:375
static void directAdderScalar(GA_Attribute *atr, GA_Offset off, int comp, SRCTYPE val)
Definition: GA_DataArray.h:382
GA_Storage
Definition: GA_Types.h:51
GLint GLsizei count
Definition: glcorearb.h:405
Definition: format.h:895
GLenum src
Definition: glcorearb.h:1793