Richard Boegli's CnC_Generals_Zero_Hour Fork
WIP
This is documentation of Richard Boegil's Zero Hour Fork
Loading...
Searching...
No Matches
motion.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
/* $Header: /Commando/Code/Tools/max2w3d/motion.h 13 10/30/00 6:56p Greg_h $ */
20
/***********************************************************************************************
21
*** Confidential - Westwood Studios ***
22
***********************************************************************************************
23
* *
24
* Project Name : Commando Tools - W3D export *
25
* *
26
* $Archive:: /Commando/Code/Tools/max2w3d/motion.h $*
27
* *
28
* $Author:: Greg_h $*
29
* *
30
* $Modtime:: 10/30/00 5:25p $*
31
* *
32
* $Revision:: 13 $*
33
* *
34
*---------------------------------------------------------------------------------------------*
35
* Functions: *
36
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38
39
#ifndef MOTION_H
40
#define MOTION_H
41
42
43
#ifndef ALWAYS_H
44
#include "always.h"
45
#endif
46
47
#include <Max.h>
48
49
#ifndef HIERSAVE_H
50
#include "
hiersave.h
"
51
#endif
52
53
#ifndef PROGRESS_H
54
#include "
progress.h
"
55
#endif
56
57
#ifndef CHUNKIO_H
58
#include "chunkio.h"
59
#endif
60
61
#ifndef VECTOR_H
62
#include "vector.h"
63
#endif
64
65
#ifndef LOGDLG_H
66
#include "
logdlg.h
"
67
#endif
68
69
struct
W3dExportOptionsStruct
;
70
71
72
class
MotionClass
73
{
74
public
:
75
76
MotionClass
(
77
IScene * scene,
78
INode * rootnode,
79
HierarchySaveClass
* basepose,
80
W3dExportOptionsStruct
& options,
81
int
framerate,
82
Progress_Meter_Class
* meter,
83
HWND MaxHwnd,
84
char
* name,
85
Matrix3
& offset =
Matrix3
(1)
// matrix to bring current object space into
86
// base object space (for damage animations)
87
);
88
89
MotionClass
(
90
IScene * scene,
91
INodeListClass
* rootlist,
92
HierarchySaveClass
* basepose,
93
W3dExportOptionsStruct
& options,
94
int
framerate,
95
Progress_Meter_Class
* meter,
96
HWND MaxHwnd,
97
char
* name,
98
Matrix3
& offset =
Matrix3
(1)
// matrix to bring current object space into
99
// base object space (for damage animations)
100
);
101
102
~MotionClass
(
void
);
103
104
bool
Save
(
ChunkSaveClass
& csave);
105
106
private
:
107
108
IScene * Scene;
109
INode * RootNode;
110
INodeListClass
* RootList;
111
HierarchySaveClass
* BasePose;
112
int
StartFrame;
113
int
EndFrame;
114
int
NumFrames;
115
int
FrameRate;
116
117
bool
ReduceAnimation;
118
int
ReduceAnimationPercent;
119
120
bool
CompressAnimation;
121
int
CompressAnimationFlavor;
122
float
CompressAnimationTranslationError;
123
float
CompressAnimationRotationError;
124
125
Progress_Meter_Class
* Meter;
126
char
Name[
W3D_NAME_LEN
];
127
Matrix3
Offset;
128
129
// 2D array of matrices, one per node per frame
130
Matrix3
* * MotionMatrix;
131
132
// 2D array of euler angles, one per node per frame
133
Point3 * * EulerDelta;
134
135
// Visibility bits, one bit per node per frame
136
BooleanVectorClass
* VisData;
137
138
// Movement bits, one bit per node per frame, to designate a movement as interpolated, or not
139
BooleanVectorClass
* BinMoveData;
140
141
// flag for each node in the base pose, indicating
142
// whether the node actually appeard in the max scene
143
// being exported.
144
BooleanVectorClass
NodeValidFlags;
145
146
void
compute_frame_motion(
int
frame);
147
void
set_motion_matrix(
int
node,
int
frame,
const
Matrix3
& motion);
148
Matrix3
get_motion_matrix(
int
node,
int
frame);
149
void
set_eulers(
int
node,
int
frame,
float
x,
float
y,
float
z);
150
Point3 get_eulers(
int
node,
int
frame);
151
void
set_visibility(
int
node,
int
frame,
bool
visible);
152
bool
get_visibility(
int
node,
int
frame);
153
void
set_binary_movement(
int
node,
int
frame,
bool
visible);
154
bool
get_binary_movement(
int
node,
int
frame);
155
156
bool
save_header(
ChunkSaveClass
& csave);
157
bool
save_channels(
ChunkSaveClass
& csave);
158
159
void
init(
void
);
160
161
};
162
163
164
#endif
/*MOTION_H*/
W3D_NAME_LEN
#define W3D_NAME_LEN
Definition
w3d_file.h:319
PROGRESS.H
BooleanVectorClass
Definition
Vector.H:968
ChunkSaveClass
Definition
chunkio.h:137
HierarchySaveClass
Definition
hiersave.h:80
INodeListClass
Definition
nodelist.h:62
Matrix3
Definition
WWmatrix3.h:74
MotionClass::~MotionClass
~MotionClass(void)
Definition
motion.cpp:295
MotionClass::Save
bool Save(ChunkSaveClass &csave)
Definition
motion.cpp:730
MotionClass::MotionClass
MotionClass(IScene *scene, INode *rootnode, HierarchySaveClass *basepose, W3dExportOptionsStruct &options, int framerate, Progress_Meter_Class *meter, HWND MaxHwnd, char *name, Matrix3 &offset=Matrix3(1))
Definition
motion.cpp:77
Progress_Meter_Class
Definition
PROGRESS.H:44
hiersave.h
logdlg.h
W3dExportOptionsStruct
Definition
w3dutil.h:65
Code
Tools
WW3D
max2w3d
motion.h
Generated by
1.13.2