|
UFO: Alien Invasion
|
md2 alias model loading More...
#include "r_local.h"
Go to the source code of this file.
Functions | |
| static void | R_ModLoadTags (model_t *mod, void *buffer, int bufSize) |
| static void | R_ModLoadAliasMD2MeshUnindexed (model_t *mod, const dMD2Model_t *md2, int bufSize, bool loadNormals) |
| Assume that the indexArray is NOT filled, and load data for the model accordingly. | |
| static void | R_ModLoadAliasMD2MeshIndexed (model_t *mod, const dMD2Model_t *md2, int bufSize) |
| Assume that the indexArray is already filled, and load data for the model accordingly. | |
| static void | R_ModLoadAliasMD2Mesh (model_t *mod, const dMD2Model_t *md2, int bufSize, bool loadNormals) |
| See if the model has an MDX file, and then load the model data appropriately for either case. | |
| static void | R_ModLoadLevelOfDetailData (model_t *mod, bool loadNormals) |
| Adds new meshes to md2 models for different level of detail meshes. | |
| void | R_ModLoadAliasMD2Model (model_t *mod, byte *buffer, int bufSize, bool loadNormals) |
| Load MD2 models from file. | |
md2 alias model loading
Definition in file r_model_md2.cpp.
|
static |
See if the model has an MDX file, and then load the model data appropriately for either case.
Definition at line 408 of file r_model_md2.cpp.
References model_t::alias, bufSize, Com_Error(), ERR_DROP, LittleLong, MD2_ALIAS_VERSION, Mem_PoolAlloc, Mem_ReAlloc, mAliasModel_t::meshes, model_t::name, mAliasModel_t::num_meshes, dMD2Model_t::ofs_end, R_ModLoadAliasMD2MeshIndexed(), R_ModLoadAliasMD2MeshUnindexed(), R_ModLoadMDX(), dMD2Model_t::version, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Model(), and R_ModLoadLevelOfDetailData().
|
static |
Assume that the indexArray is already filled, and load data for the model accordingly.
Definition at line 277 of file r_model_md2.cpp.
References AABB::add(), model_t::alias, bufSize, Com_Error(), Com_Printf(), ERR_DROP, mAliasFrame_t::fBox, mAliasModel_t::frames, dMD2Model_t::framesize, i, index, mAliasMesh_t::indexes, LittleFloat, LittleLong, LittleShort, mAliasCoord_t, MAX_ALIAS_VERTS, AABB::maxs, MD2_MAX_SKINNAME, MD2_MAX_SKINS, MD2_MAX_TRIANGLES, MD2_MAX_VERTS, Mem_Free, Mem_PoolAllocTypeN, mAliasModel_t::meshes, AABB::mins, model_t::modBox, image_t::name, mAliasMesh_t::name, mAliasSkin_t::name, model_t::name, dMD2Model_t::num_frames, mAliasModel_t::num_frames, mAliasMesh_t::num_indexes, mAliasModel_t::num_meshes, dMD2Model_t::num_skins, mAliasMesh_t::num_skins, dMD2Model_t::num_tris, mAliasMesh_t::num_tris, dMD2Model_t::num_verts, mAliasMesh_t::num_verts, dMD2Model_t::ofs_frames, dMD2Model_t::ofs_skins, dMD2Model_t::ofs_st, dMD2Model_t::ofs_tris, mAliasVertex_t::point, Q_strncpyz(), R_AliasModelGetSkin(), dMD2Frame_t::scale, mAliasFrame_t::scale, mAliasSkin_t::skin, mAliasMesh_t::skinHeight, dMD2Model_t::skinheight, mAliasMesh_t::skins, mAliasMesh_t::skinWidth, dMD2Model_t::skinwidth, mAliasMesh_t::stcoords, dMD2Frame_t::translate, mAliasFrame_t::translate, v, VectorCopy, VectorMA(), mAliasMesh_t::vertexes, dMD2Frame_t::verts, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Mesh().
|
static |
Assume that the indexArray is NOT filled, and load data for the model accordingly.
Definition at line 101 of file r_model_md2.cpp.
References AABB::add(), model_t::alias, bufSize, Com_Error(), Com_Printf(), ERR_DROP, mAliasFrame_t::fBox, mAliasModel_t::frames, dMD2Model_t::framesize, i, index, mAliasMesh_t::indexes, LittleFloat, LittleLong, LittleShort, mAliasCoord_t, MAX_ALIAS_VERTS, AABB::maxs, MD2_MAX_SKINNAME, MD2_MAX_SKINS, MD2_MAX_TRIANGLES, MD2_MAX_VERTS, Mem_Free, Mem_PoolAllocTypeN, mAliasModel_t::meshes, AABB::mins, model_t::modBox, image_t::name, mAliasMesh_t::name, mAliasSkin_t::name, model_t::name, dMD2Model_t::num_frames, mAliasModel_t::num_frames, mAliasMesh_t::num_indexes, mAliasModel_t::num_meshes, dMD2Model_t::num_skins, mAliasMesh_t::num_skins, dMD2Model_t::num_tris, mAliasMesh_t::num_tris, dMD2Model_t::num_verts, mAliasMesh_t::num_verts, dMD2Model_t::ofs_frames, dMD2Model_t::ofs_skins, dMD2Model_t::ofs_st, dMD2Model_t::ofs_tris, mAliasVertex_t::point, Q_strncpyz(), Q_strstart(), R_AliasModelGetSkin(), R_LoadActorSkinsFromModel(), R_ModCalcUniqueNormalsAndTangents(), R_UseActorSkin(), dMD2Frame_t::scale, mAliasFrame_t::scale, mAliasSkin_t::skin, mAliasMesh_t::skinHeight, dMD2Model_t::skinheight, mAliasMesh_t::skins, mAliasMesh_t::skinWidth, dMD2Model_t::skinwidth, mAliasMesh_t::stcoords, dMD2Frame_t::translate, mAliasFrame_t::translate, v, VectorCopy, VectorMA(), mAliasMesh_t::vertexes, dMD2Frame_t::verts, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Mesh().
Load MD2 models from file.
Definition at line 485 of file r_model_md2.cpp.
References model_t::alias, bufSize, Com_DefaultExtension(), Com_Error(), Com_StripExtension(), ERR_DROP, FS_CheckFile(), FS_FreeFile(), FS_LoadFile(), LittleLong, MAX_QPATH, MD2_MAX_FRAMES, mAliasModel_t::meshes, mod_alias_md2, model_t::modBox, model_t::name, dMD2Model_t::num_frames, mAliasModel_t::num_frames, R_ModLoadAliasMD2Mesh(), R_ModLoadArrayData(), R_ModLoadLevelOfDetailData(), R_ModLoadTags(), AABB::setNegativeVolume(), and model_t::type.
Referenced by LoadModel(), and R_LoadModelAsync().
Adds new meshes to md2 models for different level of detail meshes.
| mod | The model to load the lod models for |
| loadNormals | If true, load vertex normals |
Definition at line 450 of file r_model_md2.cpp.
References bufSize, Com_Printf(), Com_sprintf(), Com_StripExtension(), FS_CheckFile(), FS_FreeFile(), FS_LoadFile(), i, MAX_QPATH, model_t::name, and R_ModLoadAliasMD2Mesh().
Referenced by R_ModLoadAliasMD2Model().
Definition at line 34 of file r_model_md2.cpp.
References model_t::alias, mAliasTagOrientation_t::axis, bufSize, Com_Error(), Com_Printf(), ERR_FATAL, i, dMD2tag_t::ident, LittleFloat, LittleLong, MD2_MAX_SKINNAME, Mem_PoolAllocTypeN, mAliasTag_t::name, model_t::name, dMD2tag_t::num_frames, mAliasModel_t::num_frames, dMD2tag_t::num_tags, mAliasModel_t::num_tags, dMD2tag_t::ofs_end, dMD2tag_t::ofs_extractend, dMD2tag_t::ofs_names, dMD2tag_t::ofs_tags, mAliasTag_t::orient, mAliasTagOrientation_t::origin, TAG_VERSION, mAliasModel_t::tags, VectorSet, dMD2tag_t::version, and vid_modelPool.
Referenced by R_ModLoadAliasMD2Model().