Blender V2.61 - r43446
Public Member Functions

btUnionFind Class Reference

UnionFind calculates connected subsets. More...

#include <btUnionFind.h>

List of all members.

Public Member Functions

 btUnionFind ()
 ~btUnionFind ()
void sortIslands ()
void reset (int N)
SIMD_FORCE_INLINE int getNumElements () const
SIMD_FORCE_INLINE bool isRoot (int x) const
btElementgetElement (int index)
const btElementgetElement (int index) const
void allocate (int N)
void Free ()
int find (int p, int q)
void unite (int p, int q)
int find (int x)

Detailed Description

UnionFind calculates connected subsets.

Definition at line 35 of file btUnionFind.h.


Constructor & Destructor Documentation

btUnionFind::btUnionFind ( )

Definition at line 26 of file btUnionFind.cpp.

btUnionFind::~btUnionFind ( )

Definition at line 20 of file btUnionFind.cpp.

References Free().


Member Function Documentation

void btUnionFind::allocate ( int  N)

Definition at line 31 of file btUnionFind.cpp.

References btAlignedObjectArray< T >::resize().

Referenced by reset().

int btUnionFind::find ( int  p,
int  q 
) [inline]
int btUnionFind::find ( int  x) [inline]

Definition at line 102 of file btUnionFind.h.

References btElement::m_id.

void btUnionFind::Free ( )

Definition at line 35 of file btUnionFind.cpp.

References btAlignedObjectArray< T >::clear().

Referenced by ~btUnionFind().

btElement& btUnionFind::getElement ( int  index) [inline]
const btElement& btUnionFind::getElement ( int  index) const [inline]

Definition at line 65 of file btUnionFind.h.

SIMD_FORCE_INLINE int btUnionFind::getNumElements ( ) const [inline]
SIMD_FORCE_INLINE bool btUnionFind::isRoot ( int  x) const [inline]

Definition at line 56 of file btUnionFind.h.

void btUnionFind::reset ( int  N)

Definition at line 41 of file btUnionFind.cpp.

References allocate(), i, and N.

Referenced by btSimulationIslandManager::initUnionFind().

void btUnionFind::sortIslands ( )

this is a special operation, destroying the content of btUnionFind. it sorts the elements, based on island id, in order to make it easy to iterate over islands

Definition at line 64 of file btUnionFind.cpp.

References find(), i, btAlignedObjectArray< T >::quickSort(), and btAlignedObjectArray< T >::size().

Referenced by btSimulationIslandManager::buildIslands().

void btUnionFind::unite ( int  p,
int  q 
) [inline]

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