All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
model.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  aliashdr_t
struct  efrag_s
struct  glpoly_s
struct  hull_s
struct  instsurf_s
 Instanced surface data. More...
struct  maliasframedesc_t
struct  maliasgroup_t
struct  maliasskindesc_t
struct  maliasskingroup_t
struct  mclipnode_s
struct  medge_t
struct  mleaf_s
struct  mnode_s
struct  model_s
struct  msprite_t
struct  mspriteframe_s
struct  mspriteframedesc_t
struct  mspritegroup_t
struct  msurface_s
struct  mtexinfo_t
struct  mtriangle_s
struct  mvertex_t
struct  texture_s


#define EF_BLUE   64
#define EF_BRIGHTFIELD   1
#define EF_BRIGHTLIGHT   4
#define EF_DIMLIGHT   8
#define EF_FLAG1   16
#define EF_FLAG2   32
#define EF_GIB   4
#define EF_GLOWTRAIL   4096
#define EF_GRENADE   2
#define EF_MUZZLEFLASH   2
#define EF_RED   128
#define EF_ROCKET   1
#define EF_ROTATE   8
#define EF_TRACER   16
#define EF_TRACER2   64
#define EF_TRACER3   128
#define EF_ZOMGIB   32
#define MAX_DLIGHTS   128
#define MAX_SKINS   32
#define MAXALIASFRAMES   256
#define SURF_DONTWARP   0x100
#define SURF_DRAWNOALPHA   0x200
#define SURF_DRAWSKY   4
#define SURF_DRAWTILED   0x20
#define SURF_DRAWTURB   0x10
#define SURF_PLANEBACK   2
#define SURF_UNDERWATER   0x80
#define VERTEXSIZE   7


typedef struct efrag_s efrag_t
typedef struct glpoly_s glpoly_t
typedef struct hull_s hull_t
typedef struct instsurf_s instsurf_t
 Instanced surface data. More...
typedef struct mclipnode_s mclipnode_t
typedef struct mleaf_s mleaf_t
typedef struct mnode_s mnode_t
typedef struct model_s model_t
typedef struct mspriteframe_s mspriteframe_t
typedef struct msurface_s msurface_t
typedef struct mtriangle_s mtriangle_t
typedef struct texture_s texture_t


enum  modtype_t { mod_brush, mod_sprite, mod_alias, mod_iqm }


int Mod_CalcFullbright (byte *in, byte *out, int pixels)
void Mod_ClearAll (void)
void * Mod_Extradata (model_t *mod)
void Mod_FindClipDepth (hull_t *hull)
model_tMod_FindName (const char *name)
void Mod_FloodFillSkin (byte *skin, int skinwidth, int skinheight)
model_tMod_ForName (const char *name, qboolean crash)
int Mod_Fullbright (byte *skin, int width, int height, char *name)
void Mod_Init (void)
void Mod_Init_Cvars (void)
byteMod_LeafPVS (mleaf_t *leaf, model_t *model)
void * Mod_LoadAliasFrame (void *pin, int *posenum, maliasframedesc_t *frame, int extra)
void * Mod_LoadAliasGroup (void *pin, int *posenum, maliasframedesc_t *frame, int extra)
void Mod_LoadBrushModel (model_t *mod, void *buffer)
mleaf_tMod_PointInLeaf (const vec3_t p, model_t *model)
void Mod_Print (void)
void Mod_TouchModel (const char *name)
float RadiusFromBounds (const vec3_t mins, const vec3_t maxs)


int aliasbboxmaxs [3]
int aliasbboxmins [3]
struct cvar_sgl_alias_render_tri
struct cvar_sgl_mesh_cache
struct cvar_sgl_subdivide_size
struct cvar_sgl_textures_external
char * loadname
struct vid_model_funcs_smod_funcs
int mod_lightmap_bytes
byte mod_novis [MAX_MAP_LEAFS/8]
trivertx_tposeverts [MAXALIASFRAMES]

Macro Definition Documentation

#define EF_BLUE   64
#define EF_BRIGHTFIELD   1
#define EF_BRIGHTLIGHT   4
#define EF_DIMLIGHT   8
#define EF_FLAG1   16
#define EF_FLAG2   32
#define EF_GIB   4
#define EF_GLOWTRAIL   4096
#define EF_GRENADE   2
#define EF_MUZZLEFLASH   2
#define EF_RED   128
#define EF_ROCKET   1
#define EF_ROTATE   8
#define EF_TRACER   16
#define EF_TRACER2   64
#define EF_TRACER3   128
#define EF_ZOMGIB   32
#define MAX_DLIGHTS   128
#define MAX_SKINS   32
#define MAXALIASFRAMES   256
#define SURF_DONTWARP   0x100
#define SURF_DRAWNOALPHA   0x200
#define SURF_DRAWSKY   4
#define SURF_DRAWTILED   0x20
#define SURF_DRAWTURB   0x10
#define SURF_PLANEBACK   2
#define SURF_UNDERWATER   0x80
#define VERTEXSIZE   7

Typedef Documentation

typedef struct efrag_s efrag_t
typedef struct glpoly_s glpoly_t
typedef struct hull_s hull_t
typedef struct instsurf_s instsurf_t

Instanced surface data.

There will be one of these for each surface in the world model. This covers the sub-models in the world model. These instanced surfaces will be allocated in one block at map load time and then never freed until the next map load.

However, for instanced brush models (ammo boxes, health boxes, etc), an instanced surface will be allocated for each surface for each model once per frame. These instanced surfaces will be mass-freed each frame.

typedef struct mclipnode_s mclipnode_t
typedef struct mleaf_s mleaf_t
typedef struct mnode_s mnode_t
typedef struct model_s model_t
typedef struct msurface_s msurface_t
typedef struct mtriangle_s mtriangle_t
typedef struct texture_s texture_t

Enumeration Type Documentation

enum modtype_t

Function Documentation

int Mod_CalcFullbright ( byte in,
byte out,
int  pixels 
void Mod_ClearAll ( void  )
void* Mod_Extradata ( model_t mod)
void Mod_FindClipDepth ( hull_t hull)
model_t* Mod_FindName ( const char *  name)
void Mod_FloodFillSkin ( byte skin,
int  skinwidth,
int  skinheight 
model_t* Mod_ForName ( const char *  name,
qboolean  crash 
int Mod_Fullbright ( byte skin,
int  width,
int  height,
char *  name 
void Mod_Init ( void  )
void Mod_Init_Cvars ( void  )
byte* Mod_LeafPVS ( mleaf_t leaf,
model_t model 
void* Mod_LoadAliasFrame ( void *  pin,
int posenum,
maliasframedesc_t frame,
int  extra 
void* Mod_LoadAliasGroup ( void *  pin,
int posenum,
maliasframedesc_t frame,
int  extra 
void Mod_LoadBrushModel ( model_t mod,
void *  buffer 
mleaf_t* Mod_PointInLeaf ( const vec3_t  p,
model_t model 
void Mod_Print ( void  )
void Mod_TouchModel ( const char *  name)
float RadiusFromBounds ( const vec3_t  mins,
const vec3_t  maxs 

Variable Documentation

int aliasbboxmaxs[3]
int aliasbboxmins[3]
struct cvar_s* gl_alias_render_tri
struct cvar_s* gl_mesh_cache
struct cvar_s* gl_subdivide_size
struct cvar_s* gl_textures_external
model_t* loadmodel
char* loadname
byte* mod_base
struct vid_model_funcs_s* mod_funcs
int mod_lightmap_bytes
byte mod_novis[MAX_MAP_LEAFS/8]
aliashdr_t* pheader
stvert_t* stverts
mtriangle_t* triangles