Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
COctree Class Reference
Collaboration diagram for COctree:
Detailed Description
Octree class. Use octrees to reject polygons from your rendering pipeline as soon as possible. Unlike the BSP tree this class doesn't guarantee perfect back-to-front rendering. On the other hand, it doesn't require as much time to create an octree and filter the polygons into it as it takes with BSP creation, and polygons won't get split. Octrees are great in an z-buffered environment.
Definition at line 29 of file COctree.h.
Public Member Functions | |
void | zero () |
void | zeroChildren () |
void | clear () |
void | clearChildren () |
float | calculateCubeSize () |
void | create (float minCubeSize, int minPolyCount) |
void | create (int levels, int minPolyCount) |
void | filter (CPoly *poly) |
Public Attributes | |
COctree * | child [8] |
Child nodes. | |
bool | leaf |
True if this node is a leaf. | |
CVector | mid |
Center of cube. | |
float | size |
Size of cube. | |
std::vector< CPoly * > | polygon |
Polygons. |
Member Function Documentation
|
Calculates the initial cube size.
|
|
Starts building an octree.
|
|
Creates child nodes from this node and splits child nodes. |
|
Filters a polygon into the tree. The polygon will be added to every leaf it touches. It is up to the user not to redraw polygons as they are referenced a second time. |
The documentation for this class was generated from the following file:
Generated on Tue Feb 8 21:59:42 2005 for MarSTDv2004 by
