UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
r_model.h
Go to the documentation of this file.
1
7
8
/*
9
Copyright (C) 1997-2001 Id Software, Inc.
10
11
This program is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License
13
as published by the Free Software Foundation; either version 2
14
of the License, or (at your option) any later version.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20
See the GNU General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26
*/
27
28
#pragma once
29
30
#include "
r_entity.h
"
31
#include "
r_model_alias.h
"
32
#include "
r_model_brush.h
"
33
#include "
r_model_md2.h
"
34
#include "
r_model_md3.h
"
35
#include "
r_model_obj.h
"
36
41
typedef
enum
{
mod_bad
,
mod_bsp
,
mod_bsp_submodel
,
mod_alias_md2
,
mod_alias_md3
,
mod_obj
}
modtype_t
;
42
43
typedef
struct
model_s {
44
char
name
[
MAX_QPATH
];
45
46
modtype_t
type
;
47
48
int
flags
;
49
51
AABB
modBox
;
52
float
radius
;
53
54
bool
loaded
;
55
57
bool
clipbox
;
58
vec3_t
clipmins
,
clipmaxs
;
59
60
mBspModel_t
bsp
;
61
63
mAliasModel_t
alias
;
64
}
model_t
;
65
66
#define MAX_ACTORSKINNAME 32
67
68
/*============================================================================ */
69
70
void
R_ModModellist_f
(
void
);
71
image_t
*
R_AliasModelState
(
const
model_t
* mod,
int
* mesh,
int
* frame,
int
* oldFrame,
int
* skin);
72
image_t
*
R_AliasModelGetSkin
(
const
char
* modelFileName,
const
char
* skin);
73
void
R_DrawAliasModel
(
entity_t
* e);
74
void
R_ShutdownModels
(
bool
complete);
75
void
R_ModReloadSurfacesArrays
(
void
);
76
int
R_ModAllocateActorSkin
(
const
char
*
name
);
77
void
R_LoadActorSkinsFromModel
(
mAliasMesh_t
* outMesh,
image_t
* defaultSkin);
78
bool
R_UseActorSkin
(
void
);
79
80
model_t
*
R_FindModel
(
const
char
*
name
);
81
bool
R_ModelExists
(
const
char
*
name
);
82
model_t
*
R_GetModel
(
const
char
*
name
);
83
model_t
*
R_AllocModelSlot
(
void
);
84
85
void
R_ModelInit
();
86
void
R_ModelShutdown
();
87
89
extern
model_t
*
r_mapTiles
[MAX_MAPTILES];
90
extern
int
r_numMapTiles
;
91
92
extern
model_t
r_modelsInline
[
MAX_MOD_KNOWN
];
93
extern
int
r_numModelsInline
;
AABB
Definition
aabb.h:42
MAX_MOD_KNOWN
#define MAX_MOD_KNOWN
Definition
defines.h:160
MAX_QPATH
#define MAX_QPATH
Definition
filesys.h:40
r_entity.h
name
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition
r_gl.h:110
r_numMapTiles
int r_numMapTiles
Definition
r_model.cpp:33
r_numModelsInline
int r_numModelsInline
Definition
r_model.cpp:37
r_modelsInline
model_t r_modelsInline[MAX_MOD_KNOWN]
Definition
r_model.cpp:36
r_mapTiles
model_t * r_mapTiles[MAX_MAPTILES]
The world model(s).
Definition
r_model.cpp:32
R_ModelExists
bool R_ModelExists(const char *name)
Definition
r_model.cpp:177
R_LoadActorSkinsFromModel
void R_LoadActorSkinsFromModel(mAliasMesh_t *outMesh, image_t *defaultSkin)
Load actor skins from a default skin to a a mesh.
Definition
r_model.cpp:358
R_AliasModelState
image_t * R_AliasModelState(const model_t *mod, int *mesh, int *frame, int *oldFrame, int *skin)
Definition
r_model_alias.cpp:531
R_FindModel
model_t * R_FindModel(const char *name)
Tries to load a model.
Definition
r_model.cpp:203
R_ModModellist_f
void R_ModModellist_f(void)
Prints all loaded models.
Definition
r_model.cpp:53
R_ModelInit
void R_ModelInit()
Definition
r_model.cpp:436
R_ModelShutdown
void R_ModelShutdown()
Definition
r_model.cpp:440
R_ModAllocateActorSkin
int R_ModAllocateActorSkin(const char *name)
Register an actorskin name.
Definition
r_model.cpp:332
R_ShutdownModels
void R_ShutdownModels(bool complete)
Frees the model pool.
Definition
r_model.cpp:391
R_AliasModelGetSkin
image_t * R_AliasModelGetSkin(const char *modelFileName, const char *skin)
Definition
r_model_alias.cpp:518
R_ModReloadSurfacesArrays
void R_ModReloadSurfacesArrays(void)
Definition
r_model_brush.cpp:1167
R_UseActorSkin
bool R_UseActorSkin(void)
Definition
r_model.cpp:342
R_GetModel
model_t * R_GetModel(const char *name)
Get a model for the given name already loaded.
Definition
r_model.cpp:269
R_DrawAliasModel
void R_DrawAliasModel(entity_t *e)
Draw a model from the battlescape entity list.
Definition
r_mesh.cpp:717
R_AllocModelSlot
model_t * R_AllocModelSlot(void)
Definition
r_model.cpp:100
modtype_t
modtype_t
All supported model formats.
Definition
r_model.h:41
mod_obj
@ mod_obj
Definition
r_model.h:41
mod_bsp
@ mod_bsp
Definition
r_model.h:41
mod_alias_md3
@ mod_alias_md3
Definition
r_model.h:41
mod_bad
@ mod_bad
Definition
r_model.h:41
mod_bsp_submodel
@ mod_bsp_submodel
Definition
r_model.h:41
mod_alias_md2
@ mod_alias_md2
Definition
r_model.h:41
r_model_alias.h
Shared alias model functions.
r_model_brush.h
brush model loading
r_model_md2.h
md2 alias model loading
r_model_md3.h
md3 alias model loading
r_model_obj.h
obj model loading
entity_t
Definition
r_entity.h:96
image_t
Definition
r_image.h:61
mAliasMesh_t
Definition
r_model_alias.h:100
mAliasModel_t
Definition
r_model_alias.h:145
mBspModel_t
brush model
Definition
r_model_brush.h:199
model_t
Definition
r_model.h:43
model_t::clipmaxs
vec3_t clipmaxs
Definition
r_model.h:58
model_t::type
modtype_t type
Definition
r_model.h:46
model_t::flags
int flags
Definition
r_model.h:48
model_t::radius
float radius
Definition
r_model.h:52
model_t::modBox
AABB modBox
Definition
r_model.h:51
model_t::bsp
mBspModel_t bsp
Definition
r_model.h:60
model_t::clipmins
vec3_t clipmins
Definition
r_model.h:58
model_t::alias
mAliasModel_t alias
Definition
r_model.h:63
model_t::clipbox
bool clipbox
Definition
r_model.h:57
model_t::name
char name[MAX_QPATH]
Definition
r_model.h:44
model_t::loaded
bool loaded
Definition
r_model.h:54
vec3_t
vec_t vec3_t[3]
Definition
ufotypes.h:39
src
client
renderer
r_model.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0