Bullet Collision Detection & Physics Library: btUnionFind Class Reference

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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

UnionFind calculates connected subsets. More...

`#include <btUnionFind.h>`

Collaboration diagram for btUnionFind:
[legend]

## Public Member Functions
| btUnionFind ()
| ~btUnionFind ()
void | sortIslands ()
| this is a special operation, destroying the content of btUnionFind.
void | reset (int N)
int | getNumElements () const
bool | isRoot (int x) const
btElement & | getElement (int index)
const btElement & | getElement (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)

## Private Attributes
btAlignedObjectArray< btElement > | m_elements

## Detailed Description

UnionFind calculates connected subsets.

Definition at line 35 of file btUnionFind.h.

## Constructor & Destructor Documentation

## ◆ btUnionFind()

btUnionFind::btUnionFind | ( |  | ) |

Definition at line 23 of file btUnionFind.cpp.

## ◆ ~btUnionFind()

btUnionFind::~btUnionFind | ( |  | ) |

Definition at line 18 of file btUnionFind.cpp.

## Member Function Documentation

## ◆ allocate()

void btUnionFind::allocate | ( | int | N | ) |

Definition at line 27 of file btUnionFind.cpp.

## ◆ find() [1/2]

int btUnionFind::find | ( | int | p,
|  | int | q
| ) |  |
| inline

Definition at line 71 of file btUnionFind.h.

## ◆ find() [2/2]

int btUnionFind::find | ( | int | x | ) |
| inline

Definition at line 100 of file btUnionFind.h.

## ◆ Free()

void btUnionFind::Free | ( |  | ) |

Definition at line 31 of file btUnionFind.cpp.

## ◆ getElement() [1/2]

btElement & btUnionFind::getElement | ( | int | index | ) |
| inline

Definition at line 59 of file btUnionFind.h.

## ◆ getElement() [2/2]

const btElement & btUnionFind::getElement | ( | int | index | ) | const
| inline

Definition at line 63 of file btUnionFind.h.

## ◆ getNumElements()

int btUnionFind::getNumElements | ( |  | ) | const
| inline

Definition at line 50 of file btUnionFind.h.

## ◆ isRoot()

bool btUnionFind::isRoot | ( | int | x | ) | const
| inline

Definition at line 54 of file btUnionFind.h.

## ◆ reset()

void btUnionFind::reset | ( | int | N | ) |

Definition at line 36 of file btUnionFind.cpp.

## ◆ sortIslands()

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 58 of file btUnionFind.cpp.

## ◆ unite()

void btUnionFind::unite | ( | int | p,
|  | int | q
| ) |  |
| inline

Definition at line 76 of file btUnionFind.h.

## Member Data Documentation

## ◆ m_elements

btAlignedObjectArray<btElement> btUnionFind::m_elements
| private

Definition at line 38 of file btUnionFind.h.

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

- btUnionFind.h
- btUnionFind.cpp