In file include/csengine/bspbbox.h:

class csBspPolygon : public csPolygonInt

This class represents a polygon which can be inserted dynamically in a BSP tree

Inheritance:


Public Methods

int Classify (csPolygonInt* poly)
Classify a polygon with regards to this one.
bool ClipToPlane (csPlane* portal_plane, const csVector3& v_w2c, csVector3*& pverts, int& num_verts, bool cw = true)
Clip this polygon the Z plane and if portal_plane is given also clip the polygon to that plane
bool DoPerspective (const csTransform& trans, csVector3* source, int num_verts, csPolygon2D* dest, bool mirror)
Perspective correct a polygon
csObject* GetOriginator ()
Get the original object for which this polygon is a bounding box polygon
csBspContainer* GetParent ()
Get the parent container.
csPolyIndexed& GetPolygon ()
Get the reference to the polygon.
csPlane* GetPolyPlane ()
Return the plane of this polygon.
int GetType ()
Return 2 to indicate it is a bsp polygon.
bool SamePlane (csPolygonInt* p)
Return true if this polygon and the given polygon are on the same plane.
void SetOriginator (csObject* orig)
Set the original object.
void SetParent (csBspContainer* par)
Set the parent container.
void SetPolyPlane (const csPlane& pl)
Set the plane for this polygon.
void SplitWithPlane (csPolygonInt** front, csPolygonInt** back, csPlane& split_plane)
Split this polygon with the given plane (A,B,C,D).
void Transform (const csTransform& trans)
Transform the plane of this polygon.
void World2Camera (const csTransform& trans)
Transform the plane of this polygon from world to camera space
virtual ~csBspPolygon ()
Destructor.

Private Fields

csObject* originator
The original object for which this polygon is a bounding box polygon.
csBspContainer* parent
The parent.
csPlane plane
The plane.
csPolyIndexed polygon
The 3D polygon.

Inherited from csPolygonInt:


Documentation

This class represents a polygon which can be inserted dynamically in a BSP tree. It is specifically designed to be able to add bounding boxes to sprites and dynamic things and then add those bounding boxes to the BSP tree.
csPolyIndexed polygon
The 3D polygon.

csPlane plane
The plane.

csBspContainer* parent
The parent.

csObject* originator
The original object for which this polygon is a bounding box polygon.

virtual ~csBspPolygon()
Destructor.

csBspContainer* GetParent()
Get the parent container.

void SetParent(csBspContainer* par)
Set the parent container.

csObject* GetOriginator()
Get the original object for which this polygon is a bounding box polygon

void SetOriginator(csObject* orig)
Set the original object.

csPolyIndexed& GetPolygon()
Get the reference to the polygon.

void SetPolyPlane(const csPlane& pl)
Set the plane for this polygon.

csPlane* GetPolyPlane()
Return the plane of this polygon.

int Classify(csPolygonInt* poly)
Classify a polygon with regards to this one.

void SplitWithPlane(csPolygonInt** front, csPolygonInt** back, csPlane& split_plane)
Split this polygon with the given plane (A,B,C,D).

bool SamePlane(csPolygonInt* p)
Return true if this polygon and the given polygon are on the same plane.

int GetType()
Return 2 to indicate it is a bsp polygon.

void Transform(const csTransform& trans)
Transform the plane of this polygon.

void World2Camera(const csTransform& trans)
Transform the plane of this polygon from world to camera space

bool ClipToPlane(csPlane* portal_plane, const csVector3& v_w2c, csVector3*& pverts, int& num_verts, bool cw = true)
Clip this polygon the Z plane and if portal_plane is given also clip the polygon to that plane. @@@ NOTE @@@ This function is almost identical to one in csPolygon3D. It should be possible to reuse that code.

bool DoPerspective(const csTransform& trans, csVector3* source, int num_verts, csPolygon2D* dest, bool mirror)
Perspective correct a polygon. Note that this function is nearly identical to a version in csPolygon3D. It should be possible to reuse that code.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de