#include <octree.h>
Inheritance diagram for csOctree:
Public Methods | |
csOctree (csThing *thing, const csVector3 &min_bbox, const csVector3 &max_bbox, int bsp_num, int mode=BSP_MINIMIZE_SPLITS) | |
Create an empty tree for the given parent, a bounding box defining the outer limits of the octree, and the number of polygons at which we revert to a BSP tree. | |
virtual | ~csOctree () |
Destroy the whole octree (but not the actual polygons and parent objects). | |
csOctreeNode* | GetRoot () |
Get the root. | |
void | Build (csPolygonInt **polygons, int num) |
Create the tree with a given set of polygons. | |
void | Build (const 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 | GetConvexOutline (csOctreeNode *node, const csVector3 &pos, csVector3 *array, int &num_array, bool bVisible=false) |
Get a convex outline (not a polygon unless projected to 2D) for for this octree node as seen from the given position. More... | |
csOctreeNode* | GetLeaf (const csVector3 &pos) |
Given a position return the leaf that this position is in. | |
void | BuildVertexTables () |
Build vertex tables for minibsp leaves. More... | |
void | Statistics () |
Print statistics about this octree. | |
void | Cache (iVFS *vfs, const char *name) |
Cache this entire octree to disk (VFS). | |
bool | ReadFromCache (iVFS *vfs, const char *name, csPolygonInt **polygons, int num) |
Read this entire octree from disk (VFS). More... | |
void | CachePVS (iVFS *vfs, const char *name) |
Cache the PVS to VFS. | |
bool | ReadFromCachePVS (iVFS *vfs, const char *name) |
Read the PVS from VFS. More... |
|
Build vertex tables for minibsp leaves. These tables are used to optimize the world to camera transformation so that only the needed vertices are transformed. |
|
Get a convex outline (not a polygon unless projected to 2D) for for this octree node as seen from the given position. The coordinates returned are world space coordinates. Note that you need place for at least six vectors in the array. If bVisible is set true, the method returns all visible corners. This could be up to 7 vertices. |
|
Read this entire octree from disk (VFS). Returns false if not cached, or cache not valid. |
|
Read the PVS from VFS. Return false if not cached, or cache not valid. |