Public Member Functions | Private Member Functions | Private Attributes | List of all members
SAP_PairData Class Reference

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

Detailed Description

Definition at line 38 of file OPC_SweepAndPrune.h.

Constructor & Destructor Documentation

◆ SAP_PairData()

SAP_PairData::SAP_PairData ( )

Constructor.

Definition at line 108 of file OPC_SweepAndPrune.cpp.

◆ ~SAP_PairData()

SAP_PairData::~SAP_PairData ( )

Destructor.

Definition at line 123 of file OPC_SweepAndPrune.cpp.

Member Function Documentation

◆ AddPair()

void SAP_PairData::AddPair ( udword  id1,
udword  id2 
)

Definition at line 240 of file OPC_SweepAndPrune.cpp.

◆ DumpPairs() [1/2]

void SAP_PairData::DumpPairs ( Pairs pairs) const

◆ DumpPairs() [2/2]

void SAP_PairData::DumpPairs ( PairCallback  callback,
void user_data 
) const

Definition at line 339 of file OPC_SweepAndPrune.cpp.

◆ FreeElem()

inline_ void SAP_PairData::FreeElem ( SAP_Element elem)
private

Frees an element of the pool.

Parameters
elem[in] element to free/recycle

Definition at line 233 of file OPC_SweepAndPrune.cpp.

◆ GetFreeElem()

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.

◆ Init()

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.

◆ Release()

void SAP_PairData::Release ( )
private

Definition at line 128 of file OPC_SweepAndPrune.cpp.

◆ RemovePair()

void SAP_PairData::RemovePair ( udword  id1,
udword  id2 
)

Definition at line 282 of file OPC_SweepAndPrune.cpp.

Member Data Documentation

◆ mArray

SAP_Element** SAP_PairData::mArray
private

Pointers to pool.

Definition at line 58 of file OPC_SweepAndPrune.h.

◆ mElementPool

SAP_Element* SAP_PairData::mElementPool
private

Array of mNbElements elements.

Definition at line 54 of file OPC_SweepAndPrune.h.

◆ mFirstFree

SAP_Element* SAP_PairData::mFirstFree
private

First free element in the pool.

Definition at line 55 of file OPC_SweepAndPrune.h.

◆ mNbElements

udword SAP_PairData::mNbElements
private

Total number of elements in the pool.

Definition at line 52 of file OPC_SweepAndPrune.h.

◆ mNbObjects

udword SAP_PairData::mNbObjects
private

Max number of objects we can handle.

Definition at line 57 of file OPC_SweepAndPrune.h.

◆ mNbUsedElements

udword SAP_PairData::mNbUsedElements
private

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 Sep 8 2022 02:24:07