CrystalSpace

Public API Reference

csBSPTree Class Reference
[Geometry utilities]

This BSP-tree is a binary tree that organizes a triangle mesh. More...

#include <csgeom/bsptree.h>

Inheritance diagram for csBSPTree:

List of all members.

Public Member Functions

const csDirtyAccessArray< int > & Back2Front (const csVector3 &pos)
 Traverse the tree from back to front.
void Clear ()
 Clear the BSP-tree.
 csBSPTree ()
 Create a new empty BSP-tree.
 ~csBSPTree ()
 Destroy the BSP-tree.



void Build (CS::TriangleIndicesStream< int > &triangles, const csVector3 *vertices)
 Build the BSP tree given the set of triangles.
void Build (csTriangle *triangles, size_t num_triangles, const csVector3 *vertices)
 Build the BSP tree given the set of triangles.

Detailed Description

This BSP-tree is a binary tree that organizes a triangle mesh.

This tree will not split triangles. If a triangle needs to be split then it will be put in the two nodes.

Definition at line 46 of file bsptree.h.


Constructor & Destructor Documentation

csBSPTree::csBSPTree (  ) 

Create a new empty BSP-tree.

csBSPTree::~csBSPTree (  ) 

Destroy the BSP-tree.


Member Function Documentation

const csDirtyAccessArray<int>& csBSPTree::Back2Front ( const csVector3 pos  ) 

Traverse the tree from back to front.

This will return an array containing the triangle indices in back2front order. The array will not contain double elements.

void csBSPTree::Build ( CS::TriangleIndicesStream< int > &  triangles,
const csVector3 vertices 
)

Build the BSP tree given the set of triangles.

void csBSPTree::Build ( csTriangle triangles,
size_t  num_triangles,
const csVector3 vertices 
)

Build the BSP tree given the set of triangles.

void csBSPTree::Clear (  ) 

Clear the BSP-tree.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1