Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
BSPClass Class Reference

Public Member Functions

 BSPClass (HTreeClass *tree, int bone_index, int &leaf_index)
 
 ~BSPClass (void)
 
const PlaneClassGet_Plane (void)
 
BSPClassGet_Front_Child (void)
 
BSPClassGet_Back_Child (void)
 
void Clip_Polygon (const PolygonClass &poly)
 

Protected Member Functions

void Set_Plane_From_Transform (const Matrix3D &tm)
 

Protected Attributes

PlaneClass Plane
 
BSPClassFront
 
BSPClassBack
 
int FrontLeafIndex
 
int BackLeafIndex
 

Detailed Description

BSPClass Representation of a node in a BSP clipping tree in the shatter system Meshes are "shattered" by clipping them with a fixed BSP tree. The resulting leaf polygons are turned into separate dynamic objects which are thrown around in the world. The BSP tree is constructed using an HTree where each transform in the tree is used as a clipping plane. The plane is defined by the x-y plane of the coordinate system (i.e. z-axis is the normal of the plane, origin is a point on the plane). Leaf nodes of this tree will have two indices. These are indices into the MeshFragments array where they put the polygons in thier front and back half-spaces.

Definition at line 180 of file shattersystem.cpp.

Constructor & Destructor Documentation

◆ BSPClass()

BSPClass::BSPClass ( HTreeClass * tree,
int bone_index,
int & leaf_index )

Definition at line 688 of file shattersystem.cpp.

◆ ~BSPClass()

BSPClass::~BSPClass ( void )

Definition at line 729 of file shattersystem.cpp.

Member Function Documentation

◆ Clip_Polygon()

void BSPClass::Clip_Polygon ( const PolygonClass & poly)

Definition at line 745 of file shattersystem.cpp.

◆ Get_Back_Child()

BSPClass * BSPClass::Get_Back_Child ( void )
inline

Definition at line 188 of file shattersystem.cpp.

◆ Get_Front_Child()

BSPClass * BSPClass::Get_Front_Child ( void )
inline

Definition at line 187 of file shattersystem.cpp.

◆ Get_Plane()

const PlaneClass & BSPClass::Get_Plane ( void )
inline

Definition at line 186 of file shattersystem.cpp.

◆ Set_Plane_From_Transform()

void BSPClass::Set_Plane_From_Transform ( const Matrix3D & tm)
protected

Definition at line 740 of file shattersystem.cpp.

Member Data Documentation

◆ Back

BSPClass* BSPClass::Back
protected

Definition at line 198 of file shattersystem.cpp.

◆ BackLeafIndex

int BSPClass::BackLeafIndex
protected

Definition at line 200 of file shattersystem.cpp.

◆ Front

BSPClass* BSPClass::Front
protected

Definition at line 197 of file shattersystem.cpp.

◆ FrontLeafIndex

int BSPClass::FrontLeafIndex
protected

Definition at line 199 of file shattersystem.cpp.

◆ Plane

PlaneClass BSPClass::Plane
protected

Definition at line 196 of file shattersystem.cpp.


The documentation for this class was generated from the following file: