#include <OPC_SweepAndPrune.h>
Public Member Functions | |
void | AddPair (udword id1, udword id2) |
void | DumpPairs (PairCallback callback, void *user_data) const |
void | DumpPairs (Pairs &pairs) const |
bool | Init (udword nb_objects) |
void | RemovePair (udword id1, udword id2) |
SAP_PairData () | |
~SAP_PairData () | |
Private Member Functions | |
inline_ void | FreeElem (SAP_Element *elem) |
SAP_Element * | GetFreeElem (udword id, SAP_Element *next, udword *remap=null) |
void | Release () |
Private Attributes | |
SAP_Element ** | mArray |
Pointers to pool. More... | |
SAP_Element * | mElementPool |
Array of mNbElements elements. More... | |
SAP_Element * | mFirstFree |
First free element in the pool. More... | |
udword | mNbElements |
Total number of elements in the pool. More... | |
udword | mNbObjects |
Max number of objects we can handle. More... | |
udword | mNbUsedElements |
Number of used elements. More... | |
Definition at line 38 of file OPC_SweepAndPrune.h.
SAP_PairData::SAP_PairData | ( | ) |
Constructor.
Definition at line 108 of file OPC_SweepAndPrune.cpp.
SAP_PairData::~SAP_PairData | ( | ) |
Destructor.
Definition at line 123 of file OPC_SweepAndPrune.cpp.
Definition at line 240 of file OPC_SweepAndPrune.cpp.
void SAP_PairData::DumpPairs | ( | PairCallback | callback, |
void * | user_data | ||
) | const |
Definition at line 339 of file OPC_SweepAndPrune.cpp.
Definition at line 323 of file OPC_SweepAndPrune.cpp.
|
private |
Frees an element of the pool.
elem | [in] element to free/recycle |
Definition at line 233 of file OPC_SweepAndPrune.cpp.
|
private |
Gets a free element in the pool.
id | [in] element id |
next | [in] next element |
remap | [out] possible remapping offset |
Definition at line 179 of file OPC_SweepAndPrune.cpp.
bool SAP_PairData::Init | ( | udword | nb_objects | ) |
Initializes.
nb_objects | [in] |
Definition at line 144 of file OPC_SweepAndPrune.cpp.
|
private |
Definition at line 128 of file OPC_SweepAndPrune.cpp.
Definition at line 282 of file OPC_SweepAndPrune.cpp.
|
private |
Pointers to pool.
Definition at line 58 of file OPC_SweepAndPrune.h.
|
private |
Array of mNbElements elements.
Definition at line 54 of file OPC_SweepAndPrune.h.
|
private |
First free element in the pool.
Definition at line 55 of file OPC_SweepAndPrune.h.
|
private |
Total number of elements in the pool.
Definition at line 52 of file OPC_SweepAndPrune.h.
|
private |
Max number of objects we can handle.
Definition at line 57 of file OPC_SweepAndPrune.h.
|
private |
Number of used elements.
Definition at line 53 of file OPC_SweepAndPrune.h.