r_model.h

Go to the documentation of this file.
00001 
00008 /*
00009 Copyright (C) 1997-2001 Id Software, Inc.
00010 
00011 This program is free software; you can redistribute it and/or
00012 modify it under the terms of the GNU General Public License
00013 as published by the Free Software Foundation; either version 2
00014 of the License, or (at your option) any later version.
00015 
00016 This program is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00019 
00020 See the GNU General Public License for more details.
00021 
00022 You should have received a copy of the GNU General Public License
00023 along with this program; if not, write to the Free Software
00024 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00025 
00026 */
00027 
00028 #ifndef R_MODEL_H
00029 #define R_MODEL_H
00030 
00031 #include "r_entity.h"
00032 #include "r_model_alias.h"
00033 #include "r_model_brush.h"
00034 #include "r_model_dpm.h"
00035 #include "r_model_md2.h"
00036 #include "r_model_md3.h"
00037 #include "r_model_obj.h"
00038 
00043 typedef enum {mod_bad, mod_bsp, mod_bsp_submodel, mod_alias_md2, mod_alias_md3, mod_alias_dpm, mod_obj} modtype_t;
00044 
00045 typedef struct model_s {
00046     char name[MAX_QPATH];   
00048     modtype_t type; 
00050     int flags;
00051 
00053     vec3_t mins, maxs;
00054     float radius;
00055 
00057     qboolean clipbox;
00058     vec3_t clipmins, clipmaxs;
00059 
00060     mBspModel_t bsp;
00061 
00063     mAliasModel_t alias;
00064 } model_t;
00065 
00066 /*============================================================================ */
00067 
00068 void R_ModClearAll(void);
00069 void R_ModModellist_f(void);
00070 void R_ModDrawNullModel(entity_t *e);
00071 image_t* R_AliasModelState(const model_t *mod, int *mesh, int *frame, int *oldFrame, int *skin);
00072 image_t* R_AliasModelGetSkin(const char *modelFileName, const char *skin);
00073 void R_DrawAliasModel(entity_t *e);
00074 void R_ShutdownModels(qboolean complete);
00075 void R_ModReloadSurfacesArrays(void);
00076 
00078 extern model_t *r_mapTiles[MAX_MAPTILES];
00079 extern int r_numMapTiles;
00080 
00081 extern model_t r_models[MAX_MOD_KNOWN];
00082 extern int r_numModels;
00083 
00084 extern model_t r_modelsInline[MAX_MOD_KNOWN];
00085 extern int r_numModelsInline;
00086 
00087 #endif

Generated by  doxygen 1.6.2