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

#include <shdsubmesh.h>

Inherits MeshGeometryClass.

Public Member Functions

 W3DMPO_GLUE (ShdSubMeshClass)
 
 ShdSubMeshClass (void)
 
 ShdSubMeshClass (const ShdSubMeshClass &that)
 
 ~ShdSubMeshClass (void)
 
ShdSubMeshClassoperator= (const ShdSubMeshClass &that)
 
void Reset (int polycount, int vertcount)
 
void Set_Shader (ShdInterfaceClass *shader)
 
ShdInterfaceClassPeek_Shader (void) const
 
void Create_Decal (DecalGeneratorClass *generator)
 
void Delete_Decal (uint32 decal_id)
 
void Init_From_Legacy_Mesh_Model (MeshModelClass *model, int first_polygon)
 
WW3DErrorType Load_W3D (ChunkLoadClass &cload)
 
const Vector2Get_UV_Array (unsigned stage)
 
const unsigned * Get_Diffuse_Array ()
 
const Vector3Get_Tangent_Basis_S_Array ()
 
const Vector3Get_Tangent_Basis_T_Array ()
 
const Vector3Get_Tangent_Basis_SxT_Array ()
 
int Get_First_Visible_Polygon () const
 
int Get_Visible_Polygon_Count () const
 
bool Is_Sorting () const
 
void Get_Deformed_Vertices (Vector3 *dst_vert, Vector3 *dst_norm, const HTreeClass *htree)
 
void Get_Deformed_Vertices (Vector3 *dst_vert, const HTreeClass *htree)
 
- Public Member Functions inherited from MeshGeometryClass
 MeshGeometryClass (void)
 
 MeshGeometryClass (const MeshGeometryClass &that)
 
virtual ~MeshGeometryClass (void)
 
MeshGeometryClassoperator= (const MeshGeometryClass &that)
 
void Reset_Geometry (int polycount, int vertcount)
 
const char * Get_Name (void) const
 
void Set_Name (const char *newname)
 
const char * Get_User_Text (void)
 
void Set_User_Text (char *usertext)
 
void Set_Flag (FlagsType flag, bool onoff)
 
int Get_Flag (FlagsType flag)
 
void Set_Sort_Level (int level)
 
int Get_Sort_Level (void) const
 
int Get_Polygon_Count (void) const
 
int Get_Vertex_Count (void) const
 
const TriIndexGet_Polygon_Array (void)
 
Vector3Get_Vertex_Array (void)
 
const Vector3Get_Vertex_Normal_Array (void)
 
const Vector4Get_Plane_Array (bool create=true)
 
void Compute_Plane (int pidx, PlaneClass *set_plane) const
 
const uint32Get_Vertex_Shade_Index_Array (bool create=true)
 
const uint16Get_Vertex_Bone_Links (void)
 
uint8Get_Poly_Surface_Type_Array (void)
 
uint8 Get_Poly_Surface_Type (int poly_index) const
 
void Get_Bounding_Box (AABoxClass *set_box)
 
void Get_Bounding_Sphere (SphereClass *set_sphere)
 
bool Has_Cull_Tree (void)
 
void Generate_Rigid_APT (const Vector3 &view_dir, SimpleDynVecClass< uint32 > &apt)
 
void Generate_Rigid_APT (const OBBoxClass &local_box, SimpleDynVecClass< uint32 > &apt)
 
void Generate_Rigid_APT (const OBBoxClass &local_box, const Vector3 &view_dir, SimpleDynVecClass< uint32 > &apt)
 
void Generate_Skin_APT (const OBBoxClass &world_box, SimpleDynVecClass< uint32 > &apt, const Vector3 *world_vertex_locs)
 
bool Contains (const Vector3 &point)
 
bool Cast_Ray (RayCollisionTestClass &raytest)
 
bool Cast_AABox (AABoxCollisionTestClass &boxtest)
 
bool Cast_OBBox (OBBoxCollisionTestClass &boxtest)
 
bool Intersect_OBBox (OBBoxIntersectionTestClass &boxtest)
 
bool Cast_World_Space_AABox (AABoxCollisionTestClass &boxtest, const Matrix3D &transform)
 
void Scale (const Vector3 &sc)
 
- Public Member Functions inherited from W3DMPO
virtual ~W3DMPO ()
 
- Public Member Functions inherited from RefCountClass
 RefCountClass (void)
 
 RefCountClass (const RefCountClass &)
 
void Add_Ref (void) const
 
WWINLINE void Release_Ref (void) const
 
int Num_Refs (void) const
 
virtual void Delete_This (void)
 
- Public Member Functions inherited from MultiListObjectClass
 MultiListObjectClass (void)
 
virtual ~MultiListObjectClass (void)
 
MultiListNodeClassGet_List_Node () const
 
void Set_List_Node (MultiListNodeClass *node)
 

Protected Member Functions

WW3DErrorType read_chunks (ChunkLoadClass &cload)
 
WW3DErrorType read_vertices (ChunkLoadClass &cload)
 
WW3DErrorType read_vertex_normals (ChunkLoadClass &cload)
 
WW3DErrorType read_uv0 (ChunkLoadClass &cload)
 
WW3DErrorType read_uv1 (ChunkLoadClass &cload)
 
WW3DErrorType read_tangent_basis_s (ChunkLoadClass &cload)
 
WW3DErrorType read_tangent_basis_t (ChunkLoadClass &cload)
 
WW3DErrorType read_tangent_basis_sxt (ChunkLoadClass &cload)
 
WW3DErrorType read_vertex_influences (ChunkLoadClass &cload)
 
WW3DErrorType read_triangles (ChunkLoadClass &cload)
 
WW3DErrorType read_vertex_shade_indices (ChunkLoadClass &cload)
 
WW3DErrorType read_shader (ChunkLoadClass &cload)
 
- Protected Member Functions inherited from MeshGeometryClass
TriIndexget_polys (void)
 
Vector3get_vert_normals (void)
 
uint32get_shade_indices (bool create=true)
 
Vector4get_planes (bool create=true)
 
uint16get_bone_links (bool create=true)
 
int cast_semi_infinite_axis_aligned_ray (const Vector3 &start_point, int axis_dir, unsigned char &flags)
 
bool cast_aabox_identity (AABoxCollisionTestClass &boxtest, const Vector3 &trans)
 
bool cast_aabox_z90 (AABoxCollisionTestClass &boxtest, const Vector3 &trans)
 
bool cast_aabox_z180 (AABoxCollisionTestClass &boxtest, const Vector3 &trans)
 
bool cast_aabox_z270 (AABoxCollisionTestClass &boxtest, const Vector3 &trans)
 
bool intersect_obbox_brute_force (OBBoxIntersectionTestClass &localtest)
 
bool cast_ray_brute_force (RayCollisionTestClass &raytest)
 
bool cast_aabox_brute_force (AABoxCollisionTestClass &boxtest)
 
bool cast_obbox_brute_force (OBBoxCollisionTestClass &boxtest)
 
virtual void Compute_Plane_Equations (Vector4 *array)
 
virtual void Compute_Vertex_Normals (Vector3 *array)
 
virtual void Compute_Bounds (Vector3 *verts)
 
void Generate_Culling_Tree (void)
 
WW3DErrorType read_chunks (ChunkLoadClass &cload)
 
WW3DErrorType read_vertices (ChunkLoadClass &cload)
 
WW3DErrorType read_vertex_normals (ChunkLoadClass &cload)
 
WW3DErrorType read_triangles (ChunkLoadClass &cload)
 
WW3DErrorType read_user_text (ChunkLoadClass &cload)
 
WW3DErrorType read_vertex_influences (ChunkLoadClass &cload)
 
WW3DErrorType read_vertex_shade_indices (ChunkLoadClass &cload)
 
WW3DErrorType read_aabtree (ChunkLoadClass &cload)
 
void get_deformed_vertices (Vector3 *dst_vert, Vector3 *dst_norm, const HTreeClass *htree)
 
void get_deformed_vertices (Vector3 *dst_vert, const HTreeClass *htree)
 
void get_deformed_screenspace_vertices (Vector4 *dst_vert, const RenderInfoClass &rinfo, const Matrix3D &mesh_tm, const HTreeClass *htree)
 
- Protected Member Functions inherited from W3DMPO
virtual int glueEnforcer () const =0
 
- Protected Member Functions inherited from RefCountClass
virtual ~RefCountClass (void)
 

Protected Attributes

ShareBufferClass< Vector2 > * UV [MAX_TEXTURE_STAGES]
 
ShareBufferClass< unsigned > * Diffuse
 
ShareBufferClass< Vector3 > * S
 
ShareBufferClass< Vector3 > * T
 
ShareBufferClass< Vector3 > * SxT
 
int FirstVisiblePolygon
 
int VisiblePolygonCount
 
bool Sorting
 
ShdInterfaceClassShader
 
- Protected Attributes inherited from MeshGeometryClass
ShareBufferClass< char > * MeshName
 
ShareBufferClass< char > * UserText
 
int Flags
 
char SortLevel
 
uint32 W3dAttributes
 
int PolyCount
 
int VertexCount
 
ShareBufferClass< TriIndex > * Poly
 
ShareBufferClass< Vector3 > * Vertex
 
ShareBufferClass< Vector3 > * VertexNorm
 
ShareBufferClass< Vector4 > * PlaneEq
 
ShareBufferClass< uint32 > * VertexShadeIdx
 
ShareBufferClass< uint16 > * VertexBoneLink
 
ShareBufferClass< uint8 > * PolySurfaceType
 
Vector3 BoundBoxMin
 
Vector3 BoundBoxMax
 
Vector3 BoundSphereCenter
 
float BoundSphereRadius
 
AABTreeClassCullTree
 

Additional Inherited Members

- Public Types inherited from MeshGeometryClass
enum  FlagsType {
  DIRTY_BOUNDS = 0x00000001 , DIRTY_PLANES = 0x00000002 , DIRTY_VNORMALS = 0x00000004 , SORT = 0x00000010 ,
  DISABLE_BOUNDING_BOX = 0x00000020 , DISABLE_BOUNDING_SPHERE = 0x00000040 , DISABLE_PLANE_EQ = 0x00000080 , TWO_SIDED = 0x00000100 ,
  ALIGNED = 0x00000200 , SKIN = 0x00000400 , ORIENTED = 0x00000800 , CAST_SHADOW = 0x00001000 ,
  PRELIT_MASK = 0x0000E000 , PRELIT_VERTEX = 0x00002000 , PRELIT_LIGHTMAP_MULTI_PASS = 0x00004000 , PRELIT_LIGHTMAP_MULTI_TEXTURE = 0x00008000 ,
  ALLOW_NPATCHES = 0x00010000
}
 
- Static Public Member Functions inherited from RefCountClass
static int Total_Refs (void)
 
static RefCountClassAdd_Active_Ref (RefCountClass *obj)
 
static RefCountClassSet_Ref_Owner (RefCountClass *obj, char *file, int line)
 
static void Remove_Active_Ref (RefCountClass *obj)
 
static bool Validate_Active_Ref (RefCountClass *obj)
 
- Public Attributes inherited from RefCountClass
RefCountNodeClass ActiveRefNode
 
ActiveRefStruct ActiveRefInfo
 
- Static Public Attributes inherited from RefCountClass
static RefCountListClass ActiveRefList
 

Detailed Description

ShdSubMeshClass - A single ShdMeshClass instance will contain one or more ShdSubMeshClass.
The "sub-mesh" is a collection of polygons who all use the same shader.

Definition at line 58 of file shdsubmesh.h.

Constructor & Destructor Documentation

◆ ShdSubMeshClass() [1/2]

ShdSubMeshClass::ShdSubMeshClass ( void )

Definition at line 56 of file shdsubmesh.cpp.

◆ ShdSubMeshClass() [2/2]

ShdSubMeshClass::ShdSubMeshClass ( const ShdSubMeshClass & that)

Definition at line 73 of file shdsubmesh.cpp.

◆ ~ShdSubMeshClass()

ShdSubMeshClass::~ShdSubMeshClass ( void )

Definition at line 115 of file shdsubmesh.cpp.

Member Function Documentation

◆ Create_Decal()

void ShdSubMeshClass::Create_Decal ( DecalGeneratorClass * generator)

◆ Delete_Decal()

void ShdSubMeshClass::Delete_Decal ( uint32 decal_id)

◆ Get_Deformed_Vertices() [1/2]

void ShdSubMeshClass::Get_Deformed_Vertices ( Vector3 * dst_vert,
const HTreeClass * htree )

Definition at line 911 of file shdsubmesh.cpp.

◆ Get_Deformed_Vertices() [2/2]

void ShdSubMeshClass::Get_Deformed_Vertices ( Vector3 * dst_vert,
Vector3 * dst_norm,
const HTreeClass * htree )

Definition at line 891 of file shdsubmesh.cpp.

◆ Get_Diffuse_Array()

const unsigned * ShdSubMeshClass::Get_Diffuse_Array ( )
inline

Definition at line 95 of file shdsubmesh.h.

◆ Get_First_Visible_Polygon()

int ShdSubMeshClass::Get_First_Visible_Polygon ( ) const
inline

Definition at line 102 of file shdsubmesh.h.

◆ Get_Tangent_Basis_S_Array()

const Vector3 * ShdSubMeshClass::Get_Tangent_Basis_S_Array ( )
inline

Definition at line 96 of file shdsubmesh.h.

◆ Get_Tangent_Basis_SxT_Array()

const Vector3 * ShdSubMeshClass::Get_Tangent_Basis_SxT_Array ( )
inline

Definition at line 98 of file shdsubmesh.h.

◆ Get_Tangent_Basis_T_Array()

const Vector3 * ShdSubMeshClass::Get_Tangent_Basis_T_Array ( )
inline

Definition at line 97 of file shdsubmesh.h.

◆ Get_UV_Array()

const Vector2 * ShdSubMeshClass::Get_UV_Array ( unsigned stage)
inline

Definition at line 94 of file shdsubmesh.h.

◆ Get_Visible_Polygon_Count()

int ShdSubMeshClass::Get_Visible_Polygon_Count ( ) const
inline

Definition at line 103 of file shdsubmesh.h.

◆ Init_From_Legacy_Mesh_Model()

void ShdSubMeshClass::Init_From_Legacy_Mesh_Model ( MeshModelClass * model,
int first_polygon )

Definition at line 219 of file shdsubmesh.cpp.

◆ Is_Sorting()

bool ShdSubMeshClass::Is_Sorting ( ) const
inline

Definition at line 104 of file shdsubmesh.h.

◆ Load_W3D()

WW3DErrorType ShdSubMeshClass::Load_W3D ( ChunkLoadClass & cload)
virtual

Reimplemented from MeshGeometryClass.

Definition at line 363 of file shdsubmesh.cpp.

◆ operator=()

ShdSubMeshClass & ShdSubMeshClass::operator= ( const ShdSubMeshClass & that)

Definition at line 91 of file shdsubmesh.cpp.

◆ Peek_Shader()

ShdInterfaceClass * ShdSubMeshClass::Peek_Shader ( void ) const
inline

Definition at line 79 of file shdsubmesh.h.

◆ read_chunks()

WW3DErrorType ShdSubMeshClass::read_chunks ( ChunkLoadClass & cload)
protected

Definition at line 434 of file shdsubmesh.cpp.

◆ read_shader()

WW3DErrorType ShdSubMeshClass::read_shader ( ChunkLoadClass & cload)
protected

Definition at line 864 of file shdsubmesh.cpp.

◆ read_tangent_basis_s()

WW3DErrorType ShdSubMeshClass::read_tangent_basis_s ( ChunkLoadClass & cload)
protected

Definition at line 627 of file shdsubmesh.cpp.

◆ read_tangent_basis_sxt()

WW3DErrorType ShdSubMeshClass::read_tangent_basis_sxt ( ChunkLoadClass & cload)
protected

Definition at line 703 of file shdsubmesh.cpp.

◆ read_tangent_basis_t()

WW3DErrorType ShdSubMeshClass::read_tangent_basis_t ( ChunkLoadClass & cload)
protected

Definition at line 665 of file shdsubmesh.cpp.

◆ read_triangles()

WW3DErrorType ShdSubMeshClass::read_triangles ( ChunkLoadClass & cload)
protected

Definition at line 779 of file shdsubmesh.cpp.

◆ read_uv0()

WW3DErrorType ShdSubMeshClass::read_uv0 ( ChunkLoadClass & cload)
protected

Definition at line 551 of file shdsubmesh.cpp.

◆ read_uv1()

WW3DErrorType ShdSubMeshClass::read_uv1 ( ChunkLoadClass & cload)
protected

Definition at line 589 of file shdsubmesh.cpp.

◆ read_vertex_influences()

WW3DErrorType ShdSubMeshClass::read_vertex_influences ( ChunkLoadClass & cload)
protected

Definition at line 743 of file shdsubmesh.cpp.

◆ read_vertex_normals()

WW3DErrorType ShdSubMeshClass::read_vertex_normals ( ChunkLoadClass & cload)
protected

Definition at line 520 of file shdsubmesh.cpp.

◆ read_vertex_shade_indices()

WW3DErrorType ShdSubMeshClass::read_vertex_shade_indices ( ChunkLoadClass & cload)
protected

Definition at line 835 of file shdsubmesh.cpp.

◆ read_vertices()

WW3DErrorType ShdSubMeshClass::read_vertices ( ChunkLoadClass & cload)
protected

Definition at line 486 of file shdsubmesh.cpp.

◆ Reset()

void ShdSubMeshClass::Reset ( int polycount,
int vertcount )

◆ Set_Shader()

void ShdSubMeshClass::Set_Shader ( ShdInterfaceClass * shader)
inline

Definition at line 78 of file shdsubmesh.h.

◆ W3DMPO_GLUE()

ShdSubMeshClass::W3DMPO_GLUE ( ShdSubMeshClass )

Member Data Documentation

◆ Diffuse

ShareBufferClass<unsigned>* ShdSubMeshClass::Diffuse
protected

Definition at line 111 of file shdsubmesh.h.

◆ FirstVisiblePolygon

int ShdSubMeshClass::FirstVisiblePolygon
protected

Definition at line 117 of file shdsubmesh.h.

◆ S

ShareBufferClass<Vector3>* ShdSubMeshClass::S
protected

Definition at line 113 of file shdsubmesh.h.

◆ Shader

ShdInterfaceClass* ShdSubMeshClass::Shader
protected

Definition at line 170 of file shdsubmesh.h.

◆ Sorting

bool ShdSubMeshClass::Sorting
protected

Definition at line 119 of file shdsubmesh.h.

◆ SxT

ShareBufferClass<Vector3>* ShdSubMeshClass::SxT
protected

Definition at line 115 of file shdsubmesh.h.

◆ T

ShareBufferClass<Vector3>* ShdSubMeshClass::T
protected

Definition at line 114 of file shdsubmesh.h.

◆ UV

ShareBufferClass<Vector2>* ShdSubMeshClass::UV[MAX_TEXTURE_STAGES]
protected

Definition at line 110 of file shdsubmesh.h.

◆ VisiblePolygonCount

int ShdSubMeshClass::VisiblePolygonCount
protected

Definition at line 118 of file shdsubmesh.h.


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