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

#include <meshmdl.h>

Inherits W3DMPO.

Public Member Functions

 GapFillerClass (MeshModelClass *mmc)
 
 GapFillerClass (const GapFillerClass &that)
 
 ~GapFillerClass ()
 
WWINLINE const TriIndexGet_Polygon_Array () const
 
WWINLINE unsigned Get_Polygon_Count () const
 
WWINLINE TextureClass ** Get_Texture_Array (int pass, int stage) const
 
WWINLINE VertexMaterialClass ** Get_Material_Array (int pass) const
 
WWINLINE ShaderClassGet_Shader_Array (int pass) const
 
void Add_Polygon (unsigned polygon_index, unsigned vidx1, unsigned vidx2, unsigned vidx3)
 
void Shrink_Buffers ()
 
- Public Member Functions inherited from W3DMPO
virtual ~W3DMPO ()
 

Additional Inherited Members

- Protected Member Functions inherited from W3DMPO
virtual int glueEnforcer () const =0
 

Detailed Description

MeshModelClass This class is a repository for all of the geometry information that defines the mesh. Its purpose is to allow separate instances of a mesh to share as much data as possible.

There are some tricky aspects to this class that may not be immediately obvious. The arrays of pointers to textures and vertex materials must be handled in a special way due to the fact that they are also ref-counted objects which should only be released when the last reference to the array is released (i.e. when no one is using the array any more...)

Copy/Add_Ref Rules: The purpose of this model was to share data between models whenever possible. To this end, some of the arrays of data are handled differently:

ALWAYS SHARED: These are ALWAYS Add_Ref'd and thus all point to the same array Poly - Connectivity of a mesh are always shared (cannot be changed at runtime) VertexShadeIdx - Shade indices of a mesh are always shared (cannot be changed at runtime) VertexInfluences - Vertex bone attachments are always shared (cannot be changed at runtime)

SHARED UNTIL SCALED, SKIN DEFORMED, or DAMAGED:
Vertex - vertex positions must be copied if any are moved... VertexNorm - vertex normals cannot be shared if a vertex is moved PlaneEq - plane equations cannot be shared if a vertex is moved CullTree - culling tree becomes instance specific if a vertex moves (shouldn't even use this with skins...)

ALWAYS UNIQUE, BUT SHARE ARRAYS BETWEEN ALTERNATE MATERIAL REPRESENTATIONS (should we share some of these?) UV, DIG, DCG, SCG Texture, Shader, Material, TextureArray, MaterialArray, ShaderArray GapFillerClass This class is used to generate gap-filling polygons for "N-Patched" meshes

Definition at line 126 of file meshmdl.h.

Constructor & Destructor Documentation

◆ GapFillerClass() [1/2]

GapFillerClass::GapFillerClass ( MeshModelClass * mmc)

Definition at line 451 of file meshmdl.cpp.

◆ GapFillerClass() [2/2]

GapFillerClass::GapFillerClass ( const GapFillerClass & that)

Definition at line 483 of file meshmdl.cpp.

◆ ~GapFillerClass()

GapFillerClass::~GapFillerClass ( )

Definition at line 533 of file meshmdl.cpp.

Member Function Documentation

◆ Add_Polygon()

void GapFillerClass::Add_Polygon ( unsigned polygon_index,
unsigned vidx1,
unsigned vidx2,
unsigned vidx3 )

Definition at line 568 of file meshmdl.cpp.

◆ Get_Material_Array()

WWINLINE VertexMaterialClass ** GapFillerClass::Get_Material_Array ( int pass) const
inline

Definition at line 147 of file meshmdl.h.

◆ Get_Polygon_Array()

WWINLINE const TriIndex * GapFillerClass::Get_Polygon_Array ( ) const
inline

Definition at line 144 of file meshmdl.h.

◆ Get_Polygon_Count()

WWINLINE unsigned GapFillerClass::Get_Polygon_Count ( ) const
inline

Definition at line 145 of file meshmdl.h.

◆ Get_Shader_Array()

WWINLINE ShaderClass * GapFillerClass::Get_Shader_Array ( int pass) const
inline

Definition at line 148 of file meshmdl.h.

◆ Get_Texture_Array()

WWINLINE TextureClass ** GapFillerClass::Get_Texture_Array ( int pass,
int stage ) const
inline

Definition at line 146 of file meshmdl.h.

◆ Shrink_Buffers()

void GapFillerClass::Shrink_Buffers ( )

Definition at line 606 of file meshmdl.cpp.


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