UFO: Alien Invasion
Loading...
Searching...
No Matches
r_model_alias.h
Go to the documentation of this file.
1
5
6/*
7Copyright (C) 1997-2001 Id Software, Inc.
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24*/
25
26#pragma once
27
28#define MODEL_MAX_PATH 64
29#define MAX_ALIAS_TRIS 4096
30#define MAX_ALIAS_VERTS 8192
31
32#define mAliasCoord_t vec2_t
33
34typedef struct mAliasVertex_s {
38
39typedef struct mAliasComplexVertex_s {
44
45typedef struct mAliasBoneMatrix_s {
48
49typedef struct mAliasBoneVertex_s {
51 float influence;
53 unsigned int bonenum;
55
63
67typedef struct mAliasTagOrientation_s {
73
82typedef struct mAliasTag_s {
88
89typedef struct mAliasSkin_s {
91 int shader;
94
95typedef struct mIndexList_s {
96 int length;
97 int32_t* list;
99
128
129#define MAX_ANIMS 128
130#define MAX_ANIMNAME 16
131
132typedef struct mAliasAnim_s {
134 int from;
135 int to;
136 int time;
138
139typedef struct mAliasBone_s {
141 int flags;
142 int parent; /* -1 for no parent */
144
167
168void R_ModLoadAnims(mAliasModel_t* mod, const char* animname);
169bool R_ModLoadMDX(struct model_s* mod);
170void R_ModCalcUniqueNormalsAndTangents(mAliasMesh_t* mesh, int nFrames, float smoothness);
171void R_FillArrayData(mAliasModel_t* mod, mAliasMesh_t* mesh, float backlerp, int framenum, int oldframenum, bool prerender);
172void R_ModLoadArrayData(mAliasModel_t* mod, mAliasMesh_t* mesh, bool loadNormals);
Definition aabb.h:42
#define MODEL_MAX_PATH
#define mAliasCoord_t
void R_ModCalcUniqueNormalsAndTangents(mAliasMesh_t *mesh, int nFrames, float smoothness)
Calculates normals and tangents for all frames and does vertex merging based on smoothness.
void R_FillArrayData(mAliasModel_t *mod, mAliasMesh_t *mesh, float backlerp, int framenum, int oldframenum, bool prerender)
Converts the model data into the opengl arrays.
void R_ModLoadAnims(mAliasModel_t *mod, const char *animname)
bool R_ModLoadMDX(struct model_s *mod)
#define MAX_ANIMNAME
void R_ModLoadArrayData(mAliasModel_t *mod, mAliasMesh_t *mesh, bool loadNormals)
Allocates data arrays for animated models. Only called once at loading time.
#define MAX_VAR
Definition shared.h:36
char name[MAX_ANIMNAME]
char name[MAX_VAR]
unsigned int bonenum
mAliasBoneMatrix_t * boneMatrix
mAliasVertex_t * vertexes
int32_t * indexes
vec_t * next_normals
mAliasBoneVertex_t * bonesVertexes
mAliasSkin_t * skins
mAliasCoord_t * stcoords
mIndexList_t * revIndexes
vec_t * texcoords
vec_t * next_tangents
char name[MODEL_MAX_PATH]
int32_t num_indexes
vec_t * next_verts
int32_t num_verts
mAliasTag_t * tags
mAliasAnim_t * animdata
mAliasBone_t * bones
mAliasFrame_t * frames
mAliasMesh_t * meshes
char name[MODEL_MAX_PATH]
image_t * skin
char name[MODEL_MAX_PATH]
mAliasTagOrientation_t * orient
int32_t * list
float vec_t
Definition ufotypes.h:37
vec_t vec3_t[3]
Definition ufotypes.h:39
vec_t vec4_t[4]
Definition ufotypes.h:40