AABBTree Class Reference

Inherits AABBTreeNode.

List of all members.

Public Methods

 AABBTree ()
 ~AABBTree ()
bool Build (AABBTreeBuilder *builder)
__forceinline const udwordGetIndices () const
 Catch the indices.

__forceinline udword GetNbNodes () const
 Catch the number of nodes.

bool IsComplete () const
udword ComputeDepth () const
udword GetUsedBytes () const


Detailed Description

Contains a generic AABB tree. This is a vanilla AABB tree, without any particular optimization. It contains anonymous references to user-provided primitives, which can theoretically be anything - triangles, boxes, etc. Each primitive is surrounded by an AABB, regardless of the primitive's nature. When the primitive is a triangle, the resulting tree can be converted into an optimized tree. If the primitive is a box, the resulting tree can be used for culling - VFC or occlusion -, assuming you cull on a mesh-by-mesh basis (modern way).

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


Constructor & Destructor Documentation

AABBTree::AABBTree  
 

Constructor.

AABBTree::~AABBTree  
 

Destructor.


Member Function Documentation

bool AABBTree::Build AABBTreeBuilder *    builder
 

A method to build a generic AABB tree from a tree builder.

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

udword AABBTree::ComputeDepth   const
 

A method to compute the depth of the tree. A well-balanced tree should have a log(n) depth. A degenerate tree O(n) depth.

Returns:
depth of the tree

udword AABBTree::GetUsedBytes   const
 

A method to compute the number of bytes used by the tree.

Returns:
number of bytes used

bool AABBTree::IsComplete   const
 

A method to check the tree is a complete tree or not. A complete tree is made of 2*N-1 nodes, where N is the number of primitives in the tree.

Returns:
true for complete trees


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