Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
meshdam.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/***********************************************************************************************
20 *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
21 ***********************************************************************************************
22 * *
23 * Project Name : WW3D *
24 * *
25 * $Archive:: /Commando/Code/ww3d2/meshdam.h $*
26 * *
27 * $Author:: Greg_h $*
28 * *
29 * $Modtime:: 1/08/01 10:04a $*
30 * *
31 * $Revision:: 1 $*
32 * *
33 *---------------------------------------------------------------------------------------------*
34 * Functions: *
35 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
36
37#if 0
38
39#if defined(_MSC_VER)
40#pragma once
41#endif
42
43#ifndef MESHDAM_H
44#define MESHDAM_H
45
46#include "always.h"
47#include "vector3.h"
48#include "bittype.h"
49#include "w3derr.h"
50
51class MeshModelClass;
52class ChunkLoadClass;
53
54struct RGBStruct
55{
56 uint8 R,G,B;
57};
58
59struct DamageVertexStruct
60{
61 int VertexIdx; // index of the vertex to "damage"
62 Vector3 Vertex0; // original vertex position
63 Vector3 Vertex1; // damaged vertex position
64};
65
66struct DamageColorStruct
67{
68 int VertexIdx; // index of the vertex to damage.
69 RGBStruct Color0; // original color.
70 RGBStruct Color1; // damaged color.
71};
72
73
74/*
75** DamageClass - this class encapsulates the information needed
76** to apply damage to meshes. It contains replacement vertices,
77** vertex colors and materials
78*/
79class DamageClass
80{
81public:
82
83 DamageClass(void);
84 ~DamageClass(void);
85
86 WW3DErrorType Load_W3D(ChunkLoadClass & cload,MeshModelClass * basemesh);
87
88protected:
89
90 WW3DErrorType read_vertices(ChunkLoadClass & cload,MeshModelClass * basemesh);
91 WW3DErrorType read_colors(ChunkLoadClass & cload,MeshModelClass * basemesh);
92
93 int DamageIndex;
94 int NumMaterials;
95 int NumVerts;
96 int NumColors;
97
98 DamageVertexStruct * Verts;
99 DamageColorStruct * Colors;
100
101 friend class MeshClass;
102};
103
104
105#endif
106
107
108#endif //0
unsigned char uint8
Definition bittype.h:44
#define G(x, y, z)
Definition md5.cpp:87
WW3DErrorType
Definition w3derr.h:51