#include <bsp.h>
Inheritance diagram for csBspTree:

Public Methods | |
| csBspTree (csThing *thing, int mode=BSP_MINIMIZE_SPLITS) | |
| Create an empty tree for a parent container. | |
| virtual | ~csBspTree () |
| Destroy the whole BSP tree (but not the actual polygons and parent objects). | |
| void | Build (csPolygonInt **polygons, int num) |
| Create the tree with a given set of polygons. | |
| void | Build (csPolygonArray &polygons) |
| Create the tree with a given set of polygons. | |
| void* | Back2Front (const csVector3 &pos, csTreeVisitFunc *func, void *data, csTreeCullFunc *cullfunc=NULL, void *culldata=NULL) |
| Traverse the tree from back to front starting at the root and 'pos'. | |
| void* | Front2Back (const csVector3 &pos, csTreeVisitFunc *func, void *data, csTreeCullFunc *cullfunc=NULL, void *culldata=NULL) |
| Traverse the tree from front to back starting at the root and 'pos'. | |
| void | Statistics () |
| Print statistics about this bsp tree. | |
| void | Statistics (int *num_nodes, int *num_leaves, int *max_depth, int *tot_polygons, int *max_poly_in_node, int *min_poly_in_node) |
| Return statistics about this particular tree. | |
| int* | GetVertices (int &count) |
| Get a list of all vertices used by all the polygons in this bsp tree. More... | |
| bool | IsEmpty () |
| Return true if bsp tree is empty. | |
| void | Cache (iFile *cf, csPolygonInt **polygons, int num) |
| Cache this tree. | |
| bool | ReadFromCache (iFile *cf, csPolygonInt **polygons, int num) |
| Read this tree from cache. | |
| int | CountPolygons () |
| Count all the polygons in this tree. More... | |
|
|
Count all the polygons in this tree. This function only calls leaf polygons (i.e. polygons that will actually be returned by Front2Back/Back2Front). |
|
|
Get a list of all vertices used by all the polygons in this bsp tree. This list should be deleted with 'delete[]' after use. The vertices are returned as indices into the parent object (pset). |