|
UFO: Alien Invasion
|
Brush model header file. More...
#include "r_entity.h"#include "r_model_alias.h"#include "r_model_brush.h"#include "r_model_md2.h"#include "r_model_md3.h"#include "r_model_obj.h"

Go to the source code of this file.
Data Structures | |
| struct | model_t |
Macros | |
| #define | MAX_ACTORSKINNAME 32 |
Enumerations | |
| enum | modtype_t { mod_bad , mod_bsp , mod_bsp_submodel , mod_alias_md2 , mod_alias_md3 , mod_obj } |
| All supported model formats. More... | |
Functions | |
| void | R_ModModellist_f (void) |
| Prints all loaded models. | |
| image_t * | R_AliasModelState (const model_t *mod, int *mesh, int *frame, int *oldFrame, int *skin) |
| image_t * | R_AliasModelGetSkin (const char *modelFileName, const char *skin) |
| void | R_DrawAliasModel (entity_t *e) |
| Draw a model from the battlescape entity list. | |
| void | R_ShutdownModels (bool complete) |
| Frees the model pool. | |
| void | R_ModReloadSurfacesArrays (void) |
| int | R_ModAllocateActorSkin (const char *name) |
| Register an actorskin name. | |
| void | R_LoadActorSkinsFromModel (mAliasMesh_t *outMesh, image_t *defaultSkin) |
| Load actor skins from a default skin to a a mesh. | |
| bool | R_UseActorSkin (void) |
| model_t * | R_FindModel (const char *name) |
| Tries to load a model. | |
| bool | R_ModelExists (const char *name) |
| model_t * | R_GetModel (const char *name) |
| Get a model for the given name already loaded. | |
| model_t * | R_AllocModelSlot (void) |
| void | R_ModelInit () |
| void | R_ModelShutdown () |
Variables | |
| model_t * | r_mapTiles [MAX_MAPTILES] |
| The world model(s). | |
| int | r_numMapTiles |
| model_t | r_modelsInline [MAX_MOD_KNOWN] |
| int | r_numModelsInline |
Brush model header file.
Definition in file r_model.h.
| enum modtype_t |
All supported model formats.
| Enumerator | |
|---|---|
| mod_bad | |
| mod_bsp | |
| mod_bsp_submodel | |
| mod_alias_md2 | |
| mod_alias_md3 | |
| mod_obj | |
| image_t * R_AliasModelGetSkin | ( | const char * | modelFileName, |
| const char * | skin ) |
Definition at line 518 of file r_model_alias.cpp.
References Com_ReplaceFilename(), it_skin, MAX_QPATH, and R_FindImage().
Referenced by MD2Check(), MD2SkinFix(), R_LoadActorSkinsFromModel(), R_LoadObjSkin(), R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), and R_ModLoadAliasMD3Model().
| image_t * R_AliasModelState | ( | const model_t * | mod, |
| int * | mesh, | ||
| int * | frame, | ||
| int * | oldFrame, | ||
| int * | skin ) |
Definition at line 531 of file r_model_alias.cpp.
References model_t::alias, Com_Error(), Com_Printf(), ERR_DROP, mAliasModel_t::meshes, model_t::name, mAliasModel_t::num_frames, mAliasModel_t::num_meshes, mAliasMesh_t::num_skins, mAliasSkin_t::skin, mAliasMesh_t::skins, and image_t::texnum.
Referenced by R_DrawModelDirect(), R_DrawModelParticle(), and R_GetEntityLists().
Definition at line 100 of file r_model.cpp.
References Com_Error(), ERR_DROP, MAX_MOD_KNOWN, r_models, and r_numModels.
Referenced by R_ModAddMapTile().
Draw a model from the battlescape entity list.
Definition at line 717 of file r_mesh.cpp.
References entity_t::as, CL_ParticleSpawn(), f, mAliasFrame_t::fBox, entity_t::flags, animState_t::frame, mAliasModel_t::frames, image_t::glowmap, i, lighting_t::inShadow, entity_t::lighting, lighting_t::lights, transform_t::matrix, animState_t::mesh, mAliasModel_t::meshes, entity_t::model, image_t::normalmap, mAliasModel_t::num_frames, lighting_t::numLights, light_t::origin, R_BindTexture, R_Color(), r_debug_lights, R_DrawAliasModelBuffer(), R_DrawBoundingBox(), R_DrawMeshShadow(), r_dynamic_lights, R_EnableBumpmap(), R_EnableGlowMap(), R_EnableModelLights(), R_EnableRoughnessMap(), R_EnableSpecularMap(), R_ResetArraysAfterStaticMeshRender(), r_showbox, r_state, R_UpdateLightList(), RDF_IRGOGGLES, refdef, RF_IRGOGGLES, RF_PULSE, image_t::roughnessmap, entity_t::scale, entity_t::shell, mAliasSkin_t::skin, entity_t::skinnum, mAliasMesh_t::skins, image_t::specularmap, image_t::texnum, entity_t::transform, Vector4Set, VectorNotEmpty, and VectorScale.
Referenced by R_DrawMeshEntities().
| model_t * R_FindModel | ( | const char * | name | ) |
Tries to load a model.
| [in] | name | The model path or name (with or without extension) - see notes this parameter is always relative to the game base dir - it can also be relative to the models/ dir in the game folder |
Definition at line 203 of file r_model.cpp.
References Com_Error(), Com_GetExtension(), Com_Printf(), Com_sprintf(), ERR_FATAL, i, MAX_MOD_KNOWN, MAX_QPATH, mod_extensions, model_t::name, name, Q_strncpyz(), R_GetModel(), R_LoadModel(), r_models, and r_numModels.
Referenced by CL_AddBrushModel(), CL_CameraAppear(), CL_ParseConfigString(), CL_ParticleLoadArt(), CL_PrecacheCharacterModels(), CL_ViewLoadMedia(), CL_ViewPrecacheModels(), LM_Register(), R_Draw2DMapMarkers(), R_Draw3DMapMarkers(), R_DrawModelDirect(), SEQ_ExecuteModel(), SEQ_ExecutePrecache(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
| model_t * R_GetModel | ( | const char * | name | ) |
Get a model for the given name already loaded.
| [in] | name | Short name of the model relative to base dir without (models/model) |
Definition at line 269 of file r_model.cpp.
References Com_Error(), ERR_FATAL, i, model_t::name, name, Q_streq, r_models, r_modelsInline, r_numModels, and r_numModelsInline.
Referenced by R_FindModel().
| void R_LoadActorSkinsFromModel | ( | mAliasMesh_t * | outMesh, |
| image_t * | defaultSkin ) |
Load actor skins from a default skin to a a mesh.
| outMesh | Mesh target of skins |
| defaultSkin | Default skin of the mesh |
Definition at line 358 of file r_model.cpp.
References Com_Printf(), i, Mem_PoolAllocTypeN, image_t::name, mAliasMesh_t::name, mAliasSkin_t::name, mAliasMesh_t::num_skins, Q_strncpyz(), R_AliasModelGetSkin(), R_GetActorSkin(), r_noTexture, r_numActorSkinName, mAliasSkin_t::skin, mAliasMesh_t::skins, va(), and vid_modelPool.
Referenced by R_ModLoadAliasMD2MeshUnindexed().
| int R_ModAllocateActorSkin | ( | const char * | name | ) |
Register an actorskin name.
Definition at line 332 of file r_model.cpp.
References lengthof, Mem_StrDup, name, r_actorSkinNames, and r_numActorSkinName.
Referenced by CL_AllocateActorSkin().
| bool R_ModelExists | ( | const char * | name | ) |
Definition at line 177 of file r_model.cpp.
References Com_GetExtension(), FS_CheckFile(), i, mod_extensions, and name.
Referenced by GAME_LoadCharacter().
| void R_ModelInit | ( | ) |
Definition at line 436 of file r_model.cpp.
Referenced by R_Init().
| void R_ModelShutdown | ( | ) |
Definition at line 440 of file r_model.cpp.
References R_ShutdownModels().
Referenced by R_Shutdown().
Prints all loaded models.
Definition at line 53 of file r_model.cpp.
References model_t::alias, Com_Printf(), i, mAliasModel_t::meshes, mod_alias_md2, mod_alias_md3, mod_bsp, mod_bsp_submodel, mod_obj, mAliasSkin_t::name, model_t::name, mAliasModel_t::num_meshes, mAliasMesh_t::num_skins, mAliasMesh_t::num_tris, r_models, r_numMapTiles, r_numModels, r_numModelsInline, r_numModelsStatic, mAliasSkin_t::skin, mAliasMesh_t::skins, image_t::texnum, image_t::type, and model_t::type.
Definition at line 1167 of file r_model_brush.cpp.
References model_t::bsp, i, lengthof, Mem_Free, R_LoadSurfacesArrays(), r_mapTiles, r_numMapTiles, and mBspModel_t::sorted_surfaces.
Referenced by UI_MaterialEditorChangeValue_f().
| void R_ShutdownModels | ( | bool | complete | ) |
Frees the model pool.
| complete | If this is true the static mesh models are freed, too |
Definition at line 391 of file r_model.cpp.
References model_t::bsp, i, mBspModel_t::index_buffer, mBspModel_t::lmtexcoord_buffer, Mem_FreePool, Mem_FreeTag, mBspModel_t::normal_buffer, OBJZERO, r_models, r_numMapTiles, r_numModels, r_numModelsInline, r_numModelsStatic, mBspModel_t::tangent_buffer, mBspModel_t::texcoord_buffer, mBspModel_t::vertex_buffer, vid_lightPool, and vid_modelPool.
Referenced by CL_Disconnect(), and R_ModelShutdown().
| bool R_UseActorSkin | ( | void | ) |
Definition at line 342 of file r_model.cpp.
References r_numActorSkinName.
Referenced by R_ModLoadAliasMD2MeshUnindexed().
|
extern |
The world model(s).
Definition at line 32 of file r_model.cpp.
Referenced by R_CreateMaterialData(), R_DrawBspNormals(), R_DrawSurfaceStage(), R_GenerateGrass(), R_GenerateTriangleSoup(), R_GenerateTriangleSoup_(), R_GetLevelSurfaceLists(), R_LoadSurfacesArrays(), R_ModAddMapTile(), R_ModReloadSurfacesArrays(), R_RecursiveVisibleWorldNode(), R_RecursiveWorldNode(), R_ReinitOpenglContext(), R_RenderBspRRefs(), and R_RenderFrame().
|
extern |
Definition at line 36 of file r_model.cpp.
Referenced by R_CreateMaterialData(), R_GenerateTriangleSoup(), R_GetModel(), R_LoadSurfacesArrays(), and R_SetupSubmodels().
|
extern |
Definition at line 33 of file r_model.cpp.
Referenced by R_CreateMaterialData(), R_GenerateGrass(), R_GenerateTriangleSoup(), R_GetLevelSurfaceLists(), R_LoadSurfacesArrays(), R_ModAddMapTile(), R_ModBeginLoading(), R_ModLoadSurfaces(), R_ModModellist_f(), R_ModReloadSurfacesArrays(), R_ReinitOpenglContext(), R_RenderFrame(), R_SetupSubmodels(), R_ShutdownModels(), and R_Trace().
|
extern |
Definition at line 37 of file r_model.cpp.
Referenced by R_CreateMaterialData(), R_GenerateTriangleSoup(), R_GetModel(), R_LoadSurfacesArrays(), R_ModBeginLoading(), R_ModModellist_f(), R_SetupSubmodels(), and R_ShutdownModels().