AABBTreeNode Class Reference

Inherited by AABBTree.

List of all members.

Protected Methods

udword Split (udword axis, AABBTreeBuilder *builder)
bool Subdivide (AABBTreeBuilder *builder)
void _BuildHierarchy (AABBTreeBuilder *builder)

Protected Attributes

udwordmNodePrimitives
 Node-related primitives (shortcut to a position in mIndices below).

udword mNbPrimitives
 Number of primitives for this node.


Detailed Description

Contains a generic AABB tree node.

Author:
Pierre Terdiman
Version:
1.0
Date:
March, 20, 2001


Member Function Documentation

void AABBTreeNode::_BuildHierarchy AABBTreeBuilder *    builder [protected]
 

Recursive hierarchy building in a top-down fashion.

Parameters:
builder  [in] the tree builder

udword AABBTreeNode::Split udword    axis,
AABBTreeBuilder *    builder
[protected]
 

A method to split the node along a given axis. The list of indices is reorganized according to the split values.

Parameters:
axis  [in] splitting axis index
builder  [in] the tree builder
Returns:
the number of primitives assigned to the first child

bool AABBTreeNode::Subdivide AABBTreeBuilder *    builder [protected]
 

A method to subdivide the node.

N / \ / \ N/2 N/2 / \ / \ N/4 N/4 N/4 N/4 (etc)

A well-balanced tree should have a O(log n) depth. A degenerate tree would have a O(n) depth. Note a perfectly-balanced tree is not well-suited to collision detection anyway.

Parameters:
builder  [in] the tree builder
Returns:
true if success


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


Flat Four Engine
Copyright (C) 2001 by 379, Inc.
This page generated by Doxygen