Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csPolygonTree Class Reference

A general polygon tree. More...

#include <polytree.h>

Inheritance diagram for csPolygonTree:

csBspTree csOctree List of all members.

Public Methods

 csPolygonTree (csThing *th)
 Constructor.

virtual ~csPolygonTree ()
 Destructor.

csThingGetThing ()
 Get the thing for this tree.

virtual void Build (csPolygonInt **polygons, int num)=0
 Create the tree with a given set of polygons.

void Build (csPolygonArray &polygons)
 Create the tree with a given set of polygons.

void AddObject (csPolyTreeBBox *obj)
 Add a dynamic object to the tree.

void AddStubTodo (csPolygonStub *stub)
 Add a stub to the todo list of the tree.

bool Overlaps (csPolygonInt **polygons, int num)
 Test if any polygon in the list overlaps any other polygon. More...

virtual void* Back2Front (const csVector3 &pos, csTreeVisitFunc *func, void *data, csTreeCullFunc *cullfunc=NULL, void *culldata=NULL)=0
 Traverse the tree from back to front starting at the root and 'pos'.

virtual void* Front2Back (const csVector3 &pos, csTreeVisitFunc *func, void *data, csTreeCullFunc *cullfunc=NULL, void *culldata=NULL)=0
 Traverse the tree from front to back starting at the root and 'pos'.

virtual void Statistics ()=0
 Print statistics about this tree.


Protected Methods

void Clear ()
 Clear the nodes.

void WriteString (iFile *cf, char *str, int len)
void WriteBox3 (iFile *cf, const csBox3 &box)
void WriteVector3 (iFile *cf, const csVector3 &v)
void WritePlane3 (iFile *cf, const csPlane3 &v)
void WriteLong (iFile *cf, long l)
void WriteUShort (iFile *cf, uint16 l)
void WriteByte (iFile *cf, unsigned char b)
void WriteBool (iFile *cf, bool b)
void ReadString (iFile *cf, char *str, int len)
void ReadBox3 (iFile *cf, csBox3 &box)
void ReadVector3 (iFile *cf, csVector3 &v)
void ReadPlane3 (iFile *cf, csPlane3 &v)
long ReadLong (iFile *cf)
uint16 ReadUShort (iFile *cf)
unsigned char ReadByte (iFile *cf)
bool ReadBool (iFile *cf)

Protected Attributes

csPolygonTreeNoderoot
 The root of the tree.

csThingthing
 The parent thing that this tree is made for.


Detailed Description

A general polygon tree.

This is an abstract data type. Concrete implementations like csBspTree or csOctree inherit from this class.


Member Function Documentation

bool csPolygonTree::Overlaps ( csPolygonInt ** polygons,
int num )
 

Test if any polygon in the list overlaps any other polygon.

If this function returns false we have convexity.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000