altEngine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
md5.h
Go to the documentation of this file.
1
#include "
include.h
"
2
3
#ifndef MD5_H
4
#define MD5_H
5
6
#include <stack>
7
8
class
MD5
9
{
10
public
:
11
MD5
();
12
~MD5
();
13
14
int
load_md5
(
char
*file);
15
int
load_md5_animation
(
char
*file,
anim_list_t
*plist);
16
17
void
PrepareMesh
(
int
mesh_index,
md5_joint_t
*skeleton,
int
&
num_index
,
int
*
index_array
,
vertex_t
*
vertex_array
,
int
&
num_vertex
);
18
19
void
generate_animation
(
md5_joint_t
**&frame,
md5_anim_t
*anim);
20
void
destroy_animation
(
md5_joint_t
**&frame,
md5_anim_t
*anim);
21
void
generate_tangent
(
int
*index_array,
int
num_index,
vertex_t
*vertex_array,
int
num_vertex);
22
23
private
:
24
void
InterpolateSkeletons
(
const
md5_joint_t
*skelA,
const
md5_joint_t
*skelB,
int
num_joints,
float
interp,
md5_joint_t
*out);
25
26
void
calc_tangent
(
vertex_t
&a,
vertex_t
&b,
vertex_t
&c);
27
void
build_frame
(
md5_joint_t
*joint,
float
*frame,
md5_anim_t
*anim);
28
29
30
int
parse_joint
(
char
*data,
md5_joint_t
*joint,
int
num_joint);
31
int
parse_mesh
(
char
*data,
md5_mesh_t
*mesh);
32
int
parse_hierarchy
(
char
*data,
int
num_joint,
md5_hierarchy_t
*hierarchy);
33
int
parse_bounds
(
char
*data,
int
num_bound,
md5_aabb_t
*aabb);
34
int
parse_base
(
char
*data,
int
num_base,
md5_base_t
*base);
35
int
parse_frame
(
char
*data,
int
num_frame,
int
num_ani,
float
*frame);
36
37
38
bool
loaded
;
39
stack<anim_list_t *>
plist_stack
;
40
public
:
41
//TODO: dynamically allocate these
42
vertex_t
vertex_array[32][8196];
43
int
index_array[32][8196];
44
int
num_index[32];
45
int
num_vertex[32];
46
md5_model_t
*
model
;
47
};
48
49
#endif
Generated on Tue Nov 21 2017 19:18:54 for altEngine by
1.8.2