|
| | GT_CountArray () |
| |
| | GT_CountArray (const GT_DataArrayHandle &counts, GT_Size mincount=0, GT_Size maxcount=0) |
| |
| | GT_CountArray (const GT_CountArray &counts, const GT_DataArrayHandle &raw_offsets, GT_Size mincount, GT_Size maxcount) |
| |
| exint | getMemoryUsage () const |
| | Return memory used. More...
|
| |
| void | harden () |
| | harden the data array More...
|
| |
| void | clear () |
| | Clear the count array. More...
|
| |
| GT_Storage | getStorage () const |
| | Return the storage type. More...
|
| |
| void | init (const GT_DataArrayHandle &counts, GT_Size mincount=0, GT_Size maxcount=0) |
| | Initialize given an array of counts. More...
|
| |
| void | init (exint entries, exint repeated_value) |
| |
| GT_Size | entries () const |
| |
| GT_Offset | getOffset (exint idx) const |
| |
| GT_Size | getCount (exint idx) const |
| |
| std::pair< GT_Size, GT_Size > | getOffsetCount (exint idx) const |
| |
| bool | isEqual (const GT_CountArray &other) const |
| | Test equality. More...
|
| |
| bool | operator== (const GT_CountArray &other) const |
| |
| bool | operator!= (const GT_CountArray &other) const |
| |
| GT_Size | getMinCount () const |
| | Return the minimum value that getCount() can return. More...
|
| |
| GT_Size | getMaxCount () const |
| | Return the maximum value that getCount() can return. More...
|
| |
| GT_Size | sumCounts () const |
| | Return the sum of all the counts. More...
|
| |
| const GT_DataArrayHandle & | rawOffsets () const |
| |
| GT_DataArrayHandle | extractCounts () const |
| |
| GT_DataArrayHandle | extractOffsets () const |
| |
| GT_DataArrayHandle | buildRepeatList () const |
| | Creates a list of {0,0,0, 1,1,1,1,1, 2,2} from {3,5,2}. More...
|
| |
| bool | save (UT_JSONWriter &w) const |
| |
A count/offset array
In a polygon mesh, there is a list of faces. Each face has a number of vertices and a list of vertices. Thus, for each polygon, there's an offset into the vertex array and a count of the number of vertices to extract. This array manages those offsets/counts efficiently For example, if there are counts [3, 4, 2], the corresponding offset array would be [0, 3, 7]. Thus:
counts.getOffset(0) == 0;
counts.getOffset(1) == 3;
counts.getOffset(2) == 7;
counts.getCount(0) == 3;
counts.getCount(1) == 4;
counts.getCount(2) == 2;
Definition at line 35 of file GT_CountArray.h.