Public Member Functions | Private Member Functions | Private Attributes
SAP_PairData Class Reference

#include <OPC_SweepAndPrune.h>

List of all members.

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_ElementGetFreeElem (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.

Detailed Description

Definition at line 38 of file OPC_SweepAndPrune.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 108 of file OPC_SweepAndPrune.cpp.

Destructor.

Definition at line 123 of file OPC_SweepAndPrune.cpp.


Member Function Documentation

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.

Frees an element of the pool.

Parameters:
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.

Parameters:
id[in] element id
next[in] next element
remap[out] possible remapping offset
Returns:
the new element

Definition at line 179 of file OPC_SweepAndPrune.cpp.

bool SAP_PairData::Init ( udword  nb_objects)

Initializes.

Parameters:
nb_objects[in]
Returns:
true if success

Definition at line 144 of file OPC_SweepAndPrune.cpp.

void SAP_PairData::Release ( ) [private]

Definition at line 128 of file OPC_SweepAndPrune.cpp.

Definition at line 282 of file OPC_SweepAndPrune.cpp.


Member Data Documentation

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.

Total number of elements in the pool.

Definition at line 52 of file OPC_SweepAndPrune.h.

Max number of objects we can handle.

Definition at line 57 of file OPC_SweepAndPrune.h.

Number of used elements.

Definition at line 53 of file OPC_SweepAndPrune.h.


The documentation for this class was generated from the following files:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Apr 11 2019 03:30:21