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

#include <dynamesh.h>

Inherits MeshGeometryClass.

Public Member Functions

 DynamicMeshModel (unsigned int max_polys, unsigned int max_verts)
 
 DynamicMeshModel (unsigned int max_polys, unsigned int max_verts, MaterialInfoClass *mat_info)
 
 DynamicMeshModel (const DynamicMeshModel &src)
 
 ~DynamicMeshModel (void)
 
virtual void Compute_Plane_Equations (void)
 
virtual void Compute_Vertex_Normals (void)
 
virtual void Compute_Bounds (Vector3 *verts)
 
void Reset (void)
 
void Render (RenderInfoClass &rinfo)
 
void Set_Counts (int pnum, int vnum)
 
unsigned * Get_Color_Array (int color_array_index)
 
Vector2Get_UV_Array (int uv_array_index)
 
void Set_Single_Material (VertexMaterialClass *vmat, int pass=0)
 
void Set_Single_Texture (TextureClass *tex, int pass=0, int stage=0)
 
void Set_Single_Shader (ShaderClass shader, int pass=0)
 
void Set_Material (int vidx, VertexMaterialClass *vmat, int pass=0)
 
void Set_Shader (int pidx, ShaderClass shader, int pass=0)
 
void Set_Texture (int pidx, TextureClass *tex, int pass=0, int stage=0)
 
void Set_Pass_Count (int passes)
 
int Get_Pass_Count (void) const
 
void Initialize_Texture_Array (int pass, int stage, TextureClass *texture=NULL)
 
void Initialize_Material_Array (int pass, VertexMaterialClass *vmat=NULL)
 
MaterialInfoClassPeek_Material_Info (void)
 
MaterialInfoClassGet_Material_Info (void)
 
void Set_Material_Info (MaterialInfoClass *mat_info)
 
TriIndexGet_Non_Const_Polygon_Array (void)
 
Vector3Get_Non_Const_Vertex_Normal_Array (void)
 
- 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)
 
virtual WW3DErrorType Load_W3D (ChunkLoadClass &cload)
 
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)
 

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
 
- 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)
 
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 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
 

Detailed Description

Definition at line 59 of file dynamesh.h.

Constructor & Destructor Documentation

◆ DynamicMeshModel() [1/3]

DynamicMeshModel::DynamicMeshModel ( unsigned int max_polys,
unsigned int max_verts )

Definition at line 52 of file dynamesh.cpp.

◆ DynamicMeshModel() [2/3]

DynamicMeshModel::DynamicMeshModel ( unsigned int max_polys,
unsigned int max_verts,
MaterialInfoClass * mat_info )

Definition at line 68 of file dynamesh.cpp.

◆ DynamicMeshModel() [3/3]

DynamicMeshModel::DynamicMeshModel ( const DynamicMeshModel & src)

Definition at line 85 of file dynamesh.cpp.

◆ ~DynamicMeshModel()

DynamicMeshModel::~DynamicMeshModel ( void )

Definition at line 105 of file dynamesh.cpp.

Member Function Documentation

◆ Compute_Bounds()

void DynamicMeshModel::Compute_Bounds ( Vector3 * verts)
virtual

Reimplemented from MeshGeometryClass.

Definition at line 152 of file dynamesh.cpp.

◆ Compute_Plane_Equations()

void DynamicMeshModel::Compute_Plane_Equations ( void )
virtual

Definition at line 114 of file dynamesh.cpp.

◆ Compute_Vertex_Normals()

void DynamicMeshModel::Compute_Vertex_Normals ( void )
virtual

Definition at line 133 of file dynamesh.cpp.

◆ Get_Color_Array()

unsigned * DynamicMeshModel::Get_Color_Array ( int color_array_index)
inline

Definition at line 85 of file dynamesh.h.

◆ Get_Material_Info()

MaterialInfoClass * DynamicMeshModel::Get_Material_Info ( void )
inline

Definition at line 104 of file dynamesh.h.

◆ Get_Non_Const_Polygon_Array()

TriIndex * DynamicMeshModel::Get_Non_Const_Polygon_Array ( void )
inline

Definition at line 457 of file dynamesh.h.

◆ Get_Non_Const_Vertex_Normal_Array()

Vector3 * DynamicMeshModel::Get_Non_Const_Vertex_Normal_Array ( void )
inline

Definition at line 449 of file dynamesh.h.

◆ Get_Pass_Count()

int DynamicMeshModel::Get_Pass_Count ( void ) const
inline

Definition at line 96 of file dynamesh.h.

◆ Get_UV_Array()

Vector2 * DynamicMeshModel::Get_UV_Array ( int uv_array_index)
inline

Definition at line 86 of file dynamesh.h.

◆ Initialize_Material_Array()

void DynamicMeshModel::Initialize_Material_Array ( int pass,
VertexMaterialClass * vmat = NULL )

Definition at line 407 of file dynamesh.cpp.

◆ Initialize_Texture_Array()

void DynamicMeshModel::Initialize_Texture_Array ( int pass,
int stage,
TextureClass * texture = NULL )

Definition at line 399 of file dynamesh.cpp.

◆ Peek_Material_Info()

MaterialInfoClass * DynamicMeshModel::Peek_Material_Info ( void )
inline

Definition at line 103 of file dynamesh.h.

◆ Render()

void DynamicMeshModel::Render ( RenderInfoClass & rinfo)

Definition at line 178 of file dynamesh.cpp.

◆ Reset()

void DynamicMeshModel::Reset ( void )

Definition at line 167 of file dynamesh.cpp.

◆ Set_Counts()

void DynamicMeshModel::Set_Counts ( int pnum,
int vnum )
inline

Definition at line 82 of file dynamesh.h.

◆ Set_Material()

void DynamicMeshModel::Set_Material ( int vidx,
VertexMaterialClass * vmat,
int pass = 0 )
inline

Definition at line 92 of file dynamesh.h.

◆ Set_Material_Info()

void DynamicMeshModel::Set_Material_Info ( MaterialInfoClass * mat_info)
inline

Definition at line 105 of file dynamesh.h.

◆ Set_Pass_Count()

void DynamicMeshModel::Set_Pass_Count ( int passes)
inline

Definition at line 95 of file dynamesh.h.

◆ Set_Shader()

void DynamicMeshModel::Set_Shader ( int pidx,
ShaderClass shader,
int pass = 0 )
inline

Definition at line 93 of file dynamesh.h.

◆ Set_Single_Material()

void DynamicMeshModel::Set_Single_Material ( VertexMaterialClass * vmat,
int pass = 0 )
inline

Definition at line 88 of file dynamesh.h.

◆ Set_Single_Shader()

void DynamicMeshModel::Set_Single_Shader ( ShaderClass shader,
int pass = 0 )
inline

Definition at line 90 of file dynamesh.h.

◆ Set_Single_Texture()

void DynamicMeshModel::Set_Single_Texture ( TextureClass * tex,
int pass = 0,
int stage = 0 )
inline

Definition at line 89 of file dynamesh.h.

◆ Set_Texture()

void DynamicMeshModel::Set_Texture ( int pidx,
TextureClass * tex,
int pass = 0,
int stage = 0 )
inline

Definition at line 94 of file dynamesh.h.


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