#include <bspbbox.h>
Public Methods | |
csPolyTreeBBox () | |
Constructor. | |
~csPolyTreeBBox () | |
Destructor. | |
void | RemoveFromTree () |
Remove this object from its tree. | |
void | UnlinkStub (csPolygonStub *ps) |
Unlink a stub from the stub list. More... | |
void | LinkStub (csPolygonStub *ps) |
Link a stub to the stub list. | |
const csBox3& | GetWorldBoundingBox () |
Get the bounding box that represents this object. More... | |
csPolygonStub* | GetBaseStub () |
Get the base stub. More... | |
csVector3Array& | GetVertices () |
Get vector array for this container. | |
csVector3Array& | GetCameraVertices () |
Get camera vector array for this container. | |
void | Update (const csBox3 &object_bbox, const csTransform &o2w, csVisObjInfo *vinf) |
Update this object using an object space bounding box and a transformation. | |
void | Update (const csBox3 &world_bbox, csVisObjInfo *vinf) |
Update this object using a world space bounding box. | |
void | AddPolygon (csPolygonInt *poly) |
Add a polygon to this container. | |
int | GetPolygonCount () |
Get the number of polygons in this polygonset. | |
csPolygonInt* | GetPolygon (int idx) |
Get the specified polygon from this set. | |
csPolygonInt** | GetPolygons () |
Get the array of polygons. | |
void | World2Camera (const csTransform &trans, int cur_camera_nr) |
Transform the vertices of this container from world to camera. | |
bool | IsTransformed (int cur_camera_nr) |
Return true if this object is already transformed to camera space. | |
void | ClearTransform () |
Clear camera transformation. | |
void | SplitWithPlane (csPolygonStub *stub, csPolygonStub **stub_on, csPolygonStub **stub_front, csPolygonStub **stub_back, const csPlane3 &plane) |
Split the given stub with a plane and return three new stubs (all on the plane, in front, or back of the plane).<. More... | |
void | SplitWithPlaneX (csPolygonStub *stub, csPolygonStub **stub_on, csPolygonStub **stub_front, csPolygonStub **stub_back, float x) |
Split the given stub with an X plane. | |
void | SplitWithPlaneY (csPolygonStub *stub, csPolygonStub **stub_on, csPolygonStub **stub_front, csPolygonStub **stub_back, float y) |
Split the given stub with an Y plane. | |
void | SplitWithPlaneZ (csPolygonStub *stub, csPolygonStub **stub_on, csPolygonStub **stub_front, csPolygonStub **stub_back, float z) |
Split the given stub with an Z plane. | |
Static Public Attributes | |
csPolygonStubPool | stub_pool |
A pool of polygon stubs. | |
csPolygonStubFactory | stub_fact |
A factory for polygon stubs. |
Every engine entity that is interested in adding itself to the tree will be represented by such an object.
|
Get the base stub. In case of csPolygonStub this corresponds to the set of polygons that make up the desired object to be placed in the polygon tree. In most cases this will be a bounding box for the real object. |
|
Get the bounding box that represents this object. If the camera is inside this bbox then the object is certainly visible. |
|
Split the given stub with a plane and return three new stubs (all on the plane, in front, or back of the plane).<. p> Note that this function is responsible for freeing 'stub' itself if needed. Also this function can return NULL for stub_on, stub_front, and stub_back in which case there simply is no stub for that particular case.
Other note. This function will also correctly account for the case where the given stub_on pointer is NULL. In that case the tree is not interested in the polygons on the plane and those polygons will be distributed to stub_front. |
|
Unlink a stub from the stub list. Warning! This function does not test if the stub is really on the list! |