CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csPolygonTree Class Reference

A polygon tree. More...

#include <polytree.h>

List of all members.

Public Methods

 csPolygonTree ()
 Create a new empty polygon-tree.

 ~csPolygonTree ()
 Destroy the polygon-tree.

void Clear ()
 Make the tree empty.

void Build (iPolygonMesh *mesh)
 Build the tree from the given polygon mesh.

const csBox3 & GetBoundingBox () const
 Get the bounding box.

const csArray< int > & GetPolygons () const
 Get the array of polygon indices.

void IntersectBox (csArray< int > &polyidx, const csBox3 &box)
 Hit a box with this tree and return the polygons that intersect.

void IntersectSphere (csArray< int > &polyidx, const csVector3 &center, float sqradius)
 Hit a sphere with this tree and return the polygons that intersect.

void RemoveDoubles (csArray< int > &polyidx)
 Remove doubles in the list of polygons.


Detailed Description

A polygon tree.

This is basically a simpler version of the kdtree.

Definition at line 39 of file polytree.h.


Constructor & Destructor Documentation

csPolygonTree::csPolygonTree (    ) 
 

Create a new empty polygon-tree.

csPolygonTree::~csPolygonTree (    ) 
 

Destroy the polygon-tree.


Member Function Documentation

void csPolygonTree::Build (  iPolygonMesh *    mesh ) 
 

Build the tree from the given polygon mesh.

void csPolygonTree::Clear (    ) 
 

Make the tree empty.

const csBox3& csPolygonTree::GetBoundingBox (    )  const [inline]
 

Get the bounding box.

Definition at line 68 of file polytree.h.

const csArray<int>& csPolygonTree::GetPolygons (    )  const [inline]
 

Get the array of polygon indices.

Definition at line 71 of file polytree.h.

void csPolygonTree::IntersectBox (  csArray< int > &    polyidx,
const csBox3 &    box
) 
 

Hit a box with this tree and return the polygons that intersect.

void csPolygonTree::IntersectSphere (  csArray< int > &    polyidx,
const csVector3 &    center,
float    sqradius
) 
 

Hit a sphere with this tree and return the polygons that intersect.

void csPolygonTree::RemoveDoubles (  csArray< int > &    polyidx ) 
 

Remove doubles in the list of polygons.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.18