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