CS::Geometry::KDTreeChild Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
CS::Geometry::KDTreeChild Class Reference

A child in the KD-tree (usually some object). More...

`#include <csgeom/kdtreex.h>`

List of all members.

## Public Member Functions
void | AddLeaf (KDTree *leaf)
| Physically add a leaf to this child.
int | FindLeaf (KDTree *leaf)
| Find leaf.
const csSphere & | GetBSphere () const
| Get the bounding box of this object.
void * | GetObject () const
| Get the pointer to the black box object.
void | RemoveLeaf (int idx)
| Physically remove a leaf from this child.
void | RemoveLeaf (KDTree *leaf)
| Physically remove a leaf from this child.
void | ReplaceLeaf (KDTree *old_leaf, KDTree *new_leaf)
| Replace a leaf with another one.

## Detailed Description

A child in the KD-tree (usually some object).

Definition at line 94 of file kdtreex.h.

## Member Function Documentation

void CS::Geometry::KDTreeChild::AddLeaf | ( | KDTree * | leaf | ) |

Physically add a leaf to this child.

int CS::Geometry::KDTreeChild::FindLeaf | ( | KDTree * | leaf | ) |

Find leaf.

const csSphere& CS::Geometry::KDTreeChild::GetBSphere | ( |  | ) | const`[inline]`

Get the bounding box of this object.

Definition at line 134 of file kdtreex.h.

void* CS::Geometry::KDTreeChild::GetObject | ( |  | ) | const`[inline]`

Get the pointer to the black box object.

Definition at line 139 of file kdtreex.h.

void CS::Geometry::KDTreeChild::RemoveLeaf | ( | int | idx | ) |

Physically remove a leaf from this child.

void CS::Geometry::KDTreeChild::RemoveLeaf | ( | KDTree * | leaf | ) |

Physically remove a leaf from this child.

void CS::Geometry::KDTreeChild::ReplaceLeaf | ( | KDTree * | old_leaf,
|  | KDTree * | new_leaf
| ) |  |

Replace a leaf with another one.

This is more efficient than doing RemoveLeaf/AddLeaf and it is useful in many cases where you want to move a child in the tree.

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

- csgeom/kdtreex.h