HDK
|
Defragmentation of IndexMaps. More...
#include <GA_Defragment.h>
Classes | |
class | const_iterator |
class | swapInfo |
Public Types | |
enum | STRATEGY { DEFRAG_TO_ORDER, DEFRAG_DEFAULT = DEFRAG_TO_ORDER } |
enum | OPERATION { MOVE_A_TO_B, SWAP_AB } |
Public Member Functions | |
GA_Defragment () | |
~GA_Defragment () | |
const GA_IndexMap & | getIndexMap () const |
GA_AttributeOwner | getOwner () const |
void | clear () |
Clear all information. More... | |
void | create (const GA_IndexMap &map, STRATEGY strategy=DEFRAG_DEFAULT, const UT_Options *options=NULL) |
bool | isEmpty () const |
Check if there are any swaps to perform. More... | |
SYS_FORCE_INLINE bool | hasOffsetChanged (GA_Offset old_offset) const |
Test to see if an offset will move during the swapping. More... | |
SYS_FORCE_INLINE GA_Offset | mapOffset (GA_Offset old_offset) const |
Given the old offset, return the new offset. More... | |
GA_Offset | getOffsetMapEntries () const |
Return number of offsets stored in the map. More... | |
GA_Offset | getMaxOccupiedOffset () const |
Return the maximum offset after the defragmentation is complete. More... | |
const_iterator | begin () const |
const_iterator | end () const |
Static Public Member Functions | |
static bool | shouldIndexMapBeDefragmented (const GA_IndexMap &map, const UT_Options *options) |
Defragmentation of IndexMaps.
Defragmentation consists of two stages
NOTE: Ranges being moved can only overlap if the move is from a higher address to a lower address!
Definition at line 45 of file GA_Defragment.h.
Enumerator | |
---|---|
MOVE_A_TO_B | |
SWAP_AB |
Definition at line 61 of file GA_Defragment.h.
Enumerator | |
---|---|
DEFRAG_TO_ORDER |
Defragment so that the offsets will match the ordered index This will also remove any holes in the index map. |
DEFRAG_DEFAULT |
Default strategy. |
Definition at line 51 of file GA_Defragment.h.
GA_Defragment::GA_Defragment | ( | ) |
GA_Defragment::~GA_Defragment | ( | ) |
|
inline |
Definition at line 273 of file GA_Defragment.h.
void GA_Defragment::clear | ( | ) |
Clear all information.
void GA_Defragment::create | ( | const GA_IndexMap & | map, |
STRATEGY | strategy = DEFRAG_DEFAULT , |
||
const UT_Options * | options = NULL |
||
) |
Create a defragmentation operation using various strategies Options include
bool
force [off] occupancy
[0.75] bool
sortvertex [off]
|
inline |
Definition at line 274 of file GA_Defragment.h.
|
inline |
Definition at line 67 of file GA_Defragment.h.
|
inline |
Return the maximum offset after the defragmentation is complete.
Definition at line 106 of file GA_Defragment.h.
|
inline |
Return number of offsets stored in the map.
Definition at line 103 of file GA_Defragment.h.
|
inline |
Definition at line 68 of file GA_Defragment.h.
|
inline |
Test to see if an offset will move during the swapping.
Definition at line 94 of file GA_Defragment.h.
|
inline |
Check if there are any swaps to perform.
Definition at line 89 of file GA_Defragment.h.
|
inline |
Given the old offset, return the new offset.
Definition at line 99 of file GA_Defragment.h.
|
static |