![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "quakedef.h"
#include "image.h"
#include "r_shadow.h"
#include "mod_skeletal_animatevertices_generic.h"
Go to the source code of this file.
Macros | |
#define | BOUNDF(VALUE, MIN, MAX) |
#define | BOUNDI(VALUE, MIN, MAX) |
#define | PSKQUATNEGATIONS |
Variables | |
cvar_t | mod_alias_force_animated = {CF_CLIENT | CF_SERVER, "mod_alias_force_animated", "", "if set to an non-empty string, overrides the is-animated flag of any alias models (for benchmarking)"} |
cvar_t | mod_alias_supporttagscale = {CF_CLIENT | CF_SERVER, "mod_alias_supporttagscale", "1", "support scaling factors in bone/tag attachment matrices as supported by MD3"} |
float | mod_md3_sin [320] |
static void * | Mod_Skeletal_AnimateVertices_bonepose = NULL |
static size_t | Mod_Skeletal_AnimateVertices_maxbonepose = 0 |
cvar_t | r_nolerp_list |
cvar_t | r_skeletal_debugbone = {CF_CLIENT, "r_skeletal_debugbone", "-1", "development cvar for testing skeletal model code"} |
cvar_t | r_skeletal_debugbonecomponent = {CF_CLIENT, "r_skeletal_debugbonecomponent", "3", "development cvar for testing skeletal model code"} |
cvar_t | r_skeletal_debugbonevalue = {CF_CLIENT, "r_skeletal_debugbonevalue", "100", "development cvar for testing skeletal model code"} |
cvar_t | r_skeletal_debugtranslatex = {CF_CLIENT, "r_skeletal_debugtranslatex", "1", "development cvar for testing skeletal model code"} |
cvar_t | r_skeletal_debugtranslatey = {CF_CLIENT, "r_skeletal_debugtranslatey", "1", "development cvar for testing skeletal model code"} |
cvar_t | r_skeletal_debugtranslatez = {CF_CLIENT, "r_skeletal_debugtranslatez", "1", "development cvar for testing skeletal model code"} |
#define BOUNDF | ( | VALUE, | |
MIN, | |||
MAX ) |
Definition at line 971 of file model_alias.c.
#define BOUNDI | ( | VALUE, | |
MIN, | |||
MAX ) |
Definition at line 970 of file model_alias.c.
Referenced by Mod_IDP0_Load().
#define PSKQUATNEGATIONS |
Definition at line 2539 of file model_alias.c.
Definition at line 626 of file model_alias.c.
References model_t::AnimateVertices, surfmesh_t::data_vertex3f, frameblend_t::lerp, loadmodel, MAX_FRAMEBLENDS, Mem_Alloc, Mem_Free, model_t::mempool, model_t::normalmaxs, model_t::normalmins, NULL, model_t::num_poses, surfmesh_t::num_vertices, model_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, sqrt(), frameblend_t::subframe, model_t::surfmesh, v, VectorClear, VectorCopy, model_t::yawmaxs, and model_t::yawmins.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
int Mod_Alias_GetExtendedTagInfoForIndex | ( | const model_t * | model, |
unsigned int | skin, | ||
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
int | tagindex, | ||
int * | parentindex, | ||
const char ** | tagname, | ||
matrix4x4_t * | tag_localmatrix ) |
Definition at line 528 of file model_alias.c.
References frameblend_t::lerp, Matrix4x4_Accumulate(), Matrix4x4_Clear(), Matrix4x4_FromArray12FloatGL(), Matrix4x4_FromBonePose7s(), MAX_FRAMEBLENDS, model, skeleton_t::model, skeleton_t::relativetransforms, and frameblend_t::subframe.
Referenced by CL_GetExtendedTagInfo(), and SV_GetExtendedTagInfo().
Definition at line 585 of file model_alias.c.
References i, model, and skin.
Referenced by CL_GetTagIndex(), SV_GetTagIndex(), VM_CL_setattachment(), VM_CL_skel_find_bone(), VM_SV_setattachment(), and VM_SV_skel_find_bone().
int Mod_Alias_GetTagMatrix | ( | const model_t * | model, |
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
int | tagindex, | ||
matrix4x4_t * | outmatrix ) |
Definition at line 461 of file model_alias.c.
References identitymatrix, cvar_t::integer, frameblend_t::lerp, Matrix4x4_Accumulate(), Matrix4x4_Clear(), Matrix4x4_Concat(), Matrix4x4_FromArray12FloatGL(), Matrix4x4_FromBonePose7s(), Matrix4x4_Normalize3(), MAX_FRAMEBLENDS, mod_alias_supporttagscale, model, skeleton_t::model, skeleton_t::relativetransforms, and frameblend_t::subframe.
Referenced by CL_GetEntityLocalTagMatrix(), CL_UpdateNetworkEntity(), and SV_GetEntityLocalTagMatrix().
Definition at line 727 of file model_alias.c.
References model_t::AnimateVertices, surfmesh_t::data_element3i, surfmesh_t::data_morphtexvecvertex, surfmesh_t::data_normal3f, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, i, cvar_t::integer, frameblend_t::lerp, loadmodel, MAX_FRAMEBLENDS, Mem_Alloc, model_t::mempool, Mod_BuildTextureVectorsFromNormals(), NULL, surfmesh_t::num_morphframes, surfmesh_t::num_triangles, surfmesh_t::num_vertices, r_smoothnormals_areaweighting, frameblend_t::subframe, model_t::surfmesh, and VectorScaleCast.
Referenced by Mod_IDP0_Load(), Mod_IDP2_Load(), and Mod_IDP3_Load().
Definition at line 189 of file model_alias.c.
References Con_Printf(), Cvar_RegisterVariable(), i, M_PI, mod_alias_force_animated, mod_alias_supporttagscale, mod_md3_sin, r_skeletal_debugbone, r_skeletal_debugbonecomponent, r_skeletal_debugbonevalue, r_skeletal_debugtranslatex, r_skeletal_debugtranslatey, r_skeletal_debugtranslatez, sin(), and Sys_HaveSSE.
Referenced by Mod_Init().
void Mod_BuildAliasSkinsFromSkinFiles | ( | texture_t * | skin, |
skinfile_t * | skinfile, | ||
const char * | meshname, | ||
const char * | shadername ) |
Definition at line 925 of file model_alias.c.
References Con_DPrintf(), developer_extra, i, Image_StripImageExtension(), cvar_t::integer, skinfile_t::items, loadmodel, MATERIALFLAG_NODRAW, MATERIALFLAG_NOSHADOW, MATERIALFLAG_WALL, MAX_QPATH, model_t::mempool, Mod_LoadCustomMaterial(), Mod_LoadTextureFromQ3Shader(), model_t::name, skinfileitem_t::name, skinfile_t::next, skinfileitem_t::next, model_t::num_surfaces, r_mipskins, R_SkinFrame_LoadMissing(), skinfileitem_t::replacement, skin, SUPERCONTENTS_SOLID, TEXF_ALPHA, TEXF_COMPRESS, TEXF_MIPMAP, and TEXF_PICMIP.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
Definition at line 601 of file model_alias.c.
References model_t::data_baseboneposeinverse, model_t::data_bones, model_t::data_poses7s, loadmodel, Matrix4x4_Concat(), Matrix4x4_FromBonePose7s(), Matrix4x4_Invert_Simple(), Matrix4x4_ToArray12FloatD3D(), Mem_Alloc, Mem_Free, model_t::num_bones, model_t::num_posescale, aliasbone_t::parent, and tempmempool.
Referenced by Mod_DARKPLACESMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
|
static |
Definition at line 848 of file model_alias.c.
Referenced by Mod_MDL_LoadFrames().
Definition at line 2163 of file model_alias.c.
References dpmheader_t::allradius, model_t::AnimateVertices, model_t::animscenes, BigFloat, BigLong, surfmesh_t::blends, dpmbonevert_t::bonenum, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, f, fabs(), dpmheader_t::filesize, animscene_t::firstframe, aliasbone_t::flags, flags, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, dpmheader_t::id, dpmbonevert_t::influence, int(), cvar_t::integer, surfmesh_t::isanimated, loadmodel, animscene_t::loop, Matrix4x4_FromArray12FloatD3D(), Matrix4x4_ToBonePose7s(), max, dpmheader_t::maxs, Mem_Alloc, Mem_AllocType, Mem_ReallocType, model_t::mempool, dpmheader_t::mins, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildBaseBonePoses(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AnimateVertices(), Mod_Skeletal_CompressBlend(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, dpmbone_t::name, dpmframe_t::name, model_t::name, dpmbonevert_t::normal, model_t::normalmaxs, model_t::normalmins, NULL, surfmesh_t::num_blends, dpmheader_t::num_bones, model_t::num_bones, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, dpmheader_t::num_frames, dpmheader_t::num_meshs, model_t::num_poseinvscale, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, dpmmesh_t::num_tris, msurface_t::num_vertices, surfmesh_t::num_vertices, dpmmesh_t::num_verts, model_t::numframes, model_t::numskins, dpmheader_t::ofs_bones, dpmheader_t::ofs_frames, dpmmesh_t::ofs_indices, dpmheader_t::ofs_meshs, dpmmesh_t::ofs_texcoords, dpmmesh_t::ofs_verts, dpmbonevert_t::origin, aliasbone_t::parent, model_t::PointSuperContents, R_ConcatTransforms(), R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, model_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, dpmmesh_t::shadername, model_t::skinscenes, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, dpmheader_t::type, model_t::type, VectorLength, VectorNormalize, model_t::yawmaxs, model_t::yawmins, dpmheader_t::yawradius, Z_Free, and Z_Malloc.
Definition at line 972 of file model_alias.c.
References ALIAS_SINGLE, ALIAS_SKIN_SINGLE, ALIAS_VERSION, model_t::AnimateVertices, model_t::animscenes, BOUNDI, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), texture_t::currentframe, data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_morphmdlvertex, model_t::data_surfaces, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, dp_strlcpy, dpsnprintf(), model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, model_t::effects, animscene_t::firstframe, mdl_t::flags, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, loadmodel, animscene_t::loop, MATERIALFLAG_WALL, MAX_QPATH, Mem_Alloc, Mem_Free, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_Alias_MorphMesh_CompileFrames(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadCustomMaterial(), Mod_LoadSkinFiles(), Mod_LoadTextureFromQ3Shader(), Mod_MakeCollisionBIH(), Mod_MDL_AnimateVertices(), Mod_MDL_LoadFrames(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, animscene_t::name, model_t::name, name, model_t::nolerp, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, surfmesh_t::num_morphframes, surfmesh_t::num_morphmdlframescale, surfmesh_t::num_morphmdlframetranslate, model_t::num_poses, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, daliasgroup_t::numframes, mdl_t::numframes, model_t::numframes, daliasskingroup_t::numskins, mdl_t::numskins, model_t::numskins, mdl_t::numtris, mdl_t::numverts, model_t::PointSuperContents, r_fullbrights, r_mipskins, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_nolerp_list, R_SkinFrame_LoadExternal(), R_SkinFrame_LoadInternalQuake(), mdl_t::scale, mdl_t::scale_origin, mdl_t::skinheight, model_t::skinscenes, mdl_t::skinwidth, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, SUPERCONTENTS_SOLID, model_t::surfmesh, mdl_t::synctype, model_t::synctype, tempmempool, TEXF_ALPHA, TEXF_COMPRESS, TEXF_MIPMAP, TEXF_PICMIP, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, daliasframetype_t::type, daliasskintype_t::type, model_t::type, mdl_t::version, and version.
Definition at line 1324 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_morphmd2framesize6f, surfmesh_t::data_morphmdlvertex, model_t::data_surfaces, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, dp_strlcpy, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, animscene_t::firstframe, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, MATERIALFLAG_WALL, MD2_SKINNAME, MD2ALIAS_VERSION, Mem_Alloc, Mem_Free, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_Alias_MorphMesh_CompileFrames(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadCustomMaterial(), Mod_LoadSkinFiles(), Mod_LoadTextureFromQ3Shader(), Mod_MakeCollisionBIH(), Mod_MDL_AnimateVertices(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, animscene_t::name, md2frame_t::name, model_t::name, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, md2_t::num_frames, surfmesh_t::num_morphframes, model_t::num_poses, md2_t::num_skins, md2_t::num_st, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, md2_t::num_tris, msurface_t::num_vertices, surfmesh_t::num_vertices, md2_t::num_xyz, model_t::numframes, model_t::numskins, md2_t::ofs_end, md2_t::ofs_frames, md2_t::ofs_glcmds, md2_t::ofs_skins, md2_t::ofs_st, md2_t::ofs_tris, model_t::PointSuperContents, r_mipskins, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_SkinFrame_LoadMissing(), md2frame_t::scale, md2_t::skinheight, model_t::skinscenes, md2_t::skinwidth, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, SUPERCONTENTS_SOLID, model_t::surfmesh, model_t::synctype, tempmempool, TEXF_ALPHA, TEXF_COMPRESS, TEXF_MIPMAP, TEXF_PICMIP, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, md2frame_t::translate, model_t::type, v, md2_t::version, version, and xyz.
Definition at line 1578 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, buffer, model_t::collision_bih, model_t::CompileShadowMap, data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_morphmd3vertex, model_t::data_surfaces, model_t::data_tags, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, dp_strlcpy, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, model_t::effects, animscene_t::firstframe, md3modelheader_t::flags, animscene_t::framecount, animscene_t::framerate, Host_Error(), i, md3mesh_t::identifier, md3modelheader_t::identifier, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, md3mesh_t::lump_elements, md3mesh_t::lump_end, md3modelheader_t::lump_frameinfo, md3mesh_t::lump_framevertices, md3modelheader_t::lump_meshes, md3mesh_t::lump_shaders, md3modelheader_t::lump_tags, md3mesh_t::lump_texcoords, aliastag_t::matrixgl, MD3VERSION, Mem_Alloc, Mem_AllocType, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_Alias_MorphMesh_CompileFrames(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MD3_AnimateVertices(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliastag_t::name, animscene_t::name, md3frameinfo_t::name, md3mesh_t::name, md3tag_t::name, model_t::name, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, md3mesh_t::num_frames, md3modelheader_t::num_frames, md3modelheader_t::num_meshes, surfmesh_t::num_morphframes, model_t::num_poses, md3mesh_t::num_shaders, model_t::num_surfaces, model_t::num_tagframes, md3modelheader_t::num_tags, model_t::num_tags, model_t::num_textures, model_t::num_texturesperskin, md3mesh_t::num_triangles, msurface_t::num_triangles, surfmesh_t::num_triangles, md3mesh_t::num_vertices, msurface_t::num_vertices, surfmesh_t::num_vertices, model_t::numframes, model_t::numskins, md3tag_t::origin, md3vertex_t::origin, md3vertex_t::pitch, model_t::PointSuperContents, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), md3tag_t::rotationmatrix, model_t::skinscenes, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, md3modelheader_t::version, version, and md3vertex_t::yaw.
Definition at line 3219 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, surfmesh_t::blends, bound, buffer, iqmpose1_t::channelmask, iqmpose_t::channelmask, iqmpose1_t::channeloffset, iqmpose_t::channeloffset, iqmpose1_t::channelscale, iqmpose_t::channelscale, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), CrossProduct, data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_lightmapcolor4f, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, dp_strlcpy, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, f, fabs(), iqmheader_t::filesize, iqmanim_t::first_frame, iqmmesh_t::first_triangle, iqmmesh_t::first_vertex, animscene_t::firstframe, iqmanim_t::flags, iqmheader_t::flags, float, animscene_t::framecount, animscene_t::framerate, iqmanim_t::framerate, Host_Error(), i, iqmheader_t::id, blendweights_t::index, blendweights_t::influence, int(), cvar_t::integer, IQM_BLENDINDEXES, IQM_BLENDWEIGHTS, IQM_COLOR, IQM_FLOAT, IQM_LOOP, IQM_NORMAL, IQM_POSITION, IQM_TANGENT, IQM_TEXCOORD, IQM_UBYTE, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, iqmmesh_t::material, Matrix4x4_Concat(), Matrix4x4_FromArray12FloatD3D(), Matrix4x4_FromDoom3Joint(), Matrix4x4_Invert_Simple(), Matrix4x4_ToArray12FloatD3D(), max, maxs, Mem_Alloc, Mem_AllocType, Mem_Free, model_t::mempool, iqmbounds_t::mins, mins, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AddBlend(), Mod_Skeletal_AnimateVertices(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, iqmanim_t::name, iqmjoint1_t::name, iqmjoint_t::name, iqmmesh_t::name, model_t::name, model_t::normalmaxs, model_t::normalmins, NULL, iqmheader_t::num_anims, surfmesh_t::num_blends, model_t::num_bones, iqmheader_t::num_comment, iqmheader_t::num_extensions, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, iqmheader_t::num_framechannels, iqmanim_t::num_frames, iqmheader_t::num_frames, iqmheader_t::num_joints, iqmheader_t::num_meshes, model_t::num_poseinvscale, iqmheader_t::num_poses, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, iqmheader_t::num_text, model_t::num_textures, model_t::num_texturesperskin, iqmheader_t::num_triangles, iqmmesh_t::num_triangles, msurface_t::num_triangles, surfmesh_t::num_triangles, iqmheader_t::num_vertexarrays, iqmheader_t::num_vertexes, iqmmesh_t::num_vertexes, msurface_t::num_vertices, surfmesh_t::num_vertices, model_t::numframes, model_t::numskins, iqmheader_t::ofs_anims, iqmheader_t::ofs_bounds, iqmheader_t::ofs_comment, iqmheader_t::ofs_extensions, iqmheader_t::ofs_frames, iqmheader_t::ofs_joints, iqmheader_t::ofs_meshes, iqmheader_t::ofs_neighbors, iqmheader_t::ofs_poses, iqmheader_t::ofs_text, iqmheader_t::ofs_triangles, iqmheader_t::ofs_vertexarrays, iqmjoint1_t::origin, iqmjoint_t::origin, origin, aliasbone_t::parent, iqmjoint1_t::parent, iqmjoint_t::parent, iqmpose1_t::parent, iqmpose_t::parent, model_t::PointSuperContents, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, model_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, iqmjoint1_t::rotation, iqmjoint_t::rotation, iqmjoint1_t::scale, iqmjoint_t::scale, model_t::skinscenes, sqrt(), ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, va(), Vector4Negate, Vector4Normalize2, VectorClear, VectorCopy, iqmheader_t::version, model_t::yawmaxs, and model_t::yawmins.
|
static |
Definition at line 276 of file model_alias.c.
References f, i, MAX_FRAMEBLENDS, mod_md3_sin, model, md3vertex_t::origin, md3vertex_t::pitch, scale, texvecvertex_t::svec, texvecvertex_t::tvec, VectorMA, VectorScale, and md3vertex_t::yaw.
Referenced by Mod_IDP3_Load().
|
static |
Definition at line 364 of file model_alias.c.
References f, i, trivertx_t::lightnormalindex, m_bytenormals, MAX_FRAMEBLENDS, model, scale, texvecvertex_t::svec, texvecvertex_t::tvec, trivertx_t::v, VectorClear, VectorMA, and VectorScale.
Referenced by Mod_IDP0_Load(), and Mod_IDP2_Load().
Definition at line 864 of file model_alias.c.
References ALIAS_SINGLE, model_t::animscenes, Con_Printf(), surfmesh_t::data_morphmdlvertex, dp_strlcpy, f, animscene_t::firstframe, animscene_t::framecount, animscene_t::framerate, i, daliasinterval_t::interval, LittleFloat, LittleLong, loadmodel, animscene_t::loop, Mod_ConvertAliasVerts(), animscene_t::name, daliasframe_t::name, model_t::name, surfmesh_t::num_vertices, daliasgroup_t::numframes, model_t::numframes, model_t::surfmesh, and daliasframetype_t::type.
Referenced by Mod_IDP0_Load().
|
static |
Definition at line 794 of file model_alias.c.
References texture_t::basematerialflags, colboxbrushf_t::brush, Collision_BrushForBox(), Collision_TraceBrushTriangleMeshFloat(), trace_t::endpos, trace_t::fraction, trace_t::hitsupercontentsmask, i, MATERIALFLAGMASK_TRANSLUCENT, max, Mem_Alloc, Mem_Free, min, Mod_CollisionBIH_TraceBox(), Mod_MDLMD2MD3_TraceLine(), model, NULL, msurface_t::num_firsttriangle, msurface_t::num_triangles, skeleton_t::relativetransforms, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_SOLID, tempmempool, msurface_t::texture, VectorAdd, VectorCompare, and VectorSubtract.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
|
static |
Definition at line 755 of file model_alias.c.
References texture_t::basematerialflags, Collision_TraceLineTriangleMeshFloat(), trace_t::fraction, trace_t::hitsupercontentsmask, i, MATERIALFLAGMASK_TRANSLUCENT, max, Mem_Alloc, Mem_Free, min, Mod_CollisionBIH_TraceLine(), model, NULL, msurface_t::num_firsttriangle, msurface_t::num_triangles, skeleton_t::relativetransforms, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_SOLID, tempmempool, and msurface_t::texture.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_MDLMD2MD3_TraceBox(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
Definition at line 2540 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, pskboneinfo_t::basepose, surfmesh_t::blends, pskrawweights_t::boneindex, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_DPrintf(), Con_Printf(), data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, developer_extra, dp_strlcat, dp_strlcpy, dpsnprintf(), model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, fabs(), animscene_t::firstframe, pskaniminfo_t::firstframe, pskaniminfo_t::fps, animscene_t::framecount, animscene_t::framerate, pskanimkeys_t::frametime, FS_LoadFile(), FS_StripExtension(), pskface_t::group, Host_Error(), i, pskchunk_t::id, index, int(), cvar_t::integer, surfmesh_t::isanimated, LittleFloat, LittleLong, LittleShort, loadmodel, animscene_t::loop, Matrix4x4_Concat(), Matrix4x4_FromOriginQuat(), Matrix4x4_Invert_Simple(), Matrix4x4_ToArray12FloatD3D(), pskface_t::mattindex, max, MAX_QPATH, Mem_Alloc, Mem_AllocType, Mem_Free, Mem_ReallocType, model_t::mempool, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AnimateVertices(), Mod_Skeletal_CompressBlend(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, model_t::name, pskaniminfo_t::name, pskboneinfo_t::name, pskmatt_t::name, NULL, surfmesh_t::num_blends, model_t::num_bones, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_t::num_poseinvscale, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, pskaniminfo_t::numbones, pskboneinfo_t::numchildren, model_t::numframes, pskaniminfo_t::numframes, pskchunk_t::numrecords, model_t::numskins, pskanimkeys_t::origin, pskpnts_t::origin, pskpose_t::origin, aliasbone_t::parent, pskboneinfo_t::parent, pskaniminfo_t::playtime, pskrawweights_t::pntsindex, pskvtxw_t::pntsindex, model_t::PointSuperContents, pskanimkeys_t::quat, pskpose_t::quat, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, pskchunk_t::recordsize, pskpose_t::size, model_t::skinscenes, ST_RAND, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, tempmempool, pskvtxw_t::texcoord, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, pskpose_t::unknown, Vector4Copy, Vector4Negate, Vector4Normalize2, pskchunk_t::version, version, pskface_t::vtxwindex, and pskrawweights_t::weight.
|
static |
Definition at line 216 of file model_alias.c.
References i, blendweights_t::index, blendweights_t::influence, and model.
Referenced by Mod_INTERQUAKEMODEL_Load(), and Mod_Skeletal_CompressBlend().
|
static |
Definition at line 163 of file model_alias.c.
References cvar_t::integer, Mod_Skeletal_AnimateVertices_Generic(), and model.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
void * Mod_Skeletal_AnimateVertices_AllocBuffers | ( | size_t | nbytes | ) |
Definition at line 53 of file model_alias.c.
References Mem_Free, Mod_Skeletal_AnimateVertices_bonepose, Mod_Skeletal_AnimateVertices_maxbonepose, and Z_Malloc.
Referenced by Mod_Skeletal_AnimateVertices_Generic(), and Mod_Skeletal_BuildTransforms().
void Mod_Skeletal_BuildTransforms | ( | const model_t *RESTRICT | model, |
const frameblend_t *RESTRICT | frameblend, | ||
const skeleton_t * | skeleton, | ||
float *RESTRICT | bonepose, | ||
float *RESTRICT | boneposerelative ) |
Definition at line 65 of file model_alias.c.
References i, cvar_t::integer, Matrix4x4_ToArray12FloatD3D(), MAX_FRAMEBLENDS, Mod_Skeletal_AnimateVertices_AllocBuffers(), model, NULL, R_ConcatTransforms(), r_skeletal_debugbone, r_skeletal_debugbonecomponent, r_skeletal_debugbonevalue, r_skeletal_debugtranslatex, r_skeletal_debugtranslatey, r_skeletal_debugtranslatez, skeleton_t::relativetransforms, RESTRICT, scale, sw, and cvar_t::value.
Referenced by Mod_Skeletal_AnimateVertices_Generic(), and R_AnimCache_GetEntity().
|
static |
Definition at line 233 of file model_alias.c.
References i, blendweights_t::index, blendweights_t::influence, Mod_Skeletal_AddBlend(), model, and scale.
Referenced by Mod_DARKPLACESMODEL_Load(), and Mod_PSKMODEL_Load().
Definition at line 46 of file model_alias.c.
References Mem_Free, Mod_Skeletal_AnimateVertices_bonepose, Mod_Skeletal_AnimateVertices_maxbonepose, and NULL.
Referenced by mod_shutdown().
Definition at line 1768 of file model_alias.c.
References model_t::AnimateVertices, model_t::animscenes, BigFloat, BigLong, surfmesh_t::blends, buffer, model_t::collision_bih, model_t::CompileShadowMap, Con_Printf(), count, data, model_t::data_baseboneposeinverse, surfmesh_t::data_blendweights, model_t::data_bones, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_normal3f, model_t::data_poses7s, surfmesh_t::data_skeletalindex4ub, surfmesh_t::data_skeletalweight4ub, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, f, fabs(), zymtype1header_t::filesize, animscene_t::firstframe, aliasbone_t::flags, flags, zymscene_t::flags, animscene_t::framecount, animscene_t::framerate, zymscene_t::framerate, Host_Error(), i, zymtype1header_t::id, int(), cvar_t::integer, surfmesh_t::isanimated, zymlump_t::length, zymscene_t::length, loadmodel, animscene_t::loop, zymtype1header_t::lump_bones, zymtype1header_t::lump_poses, zymtype1header_t::lump_render, zymtype1header_t::lump_scenes, zymtype1header_t::lump_shaders, zymtype1header_t::lump_texcoords, zymtype1header_t::lump_trizone, zymtype1header_t::lump_vertbonecounts, zymtype1header_t::lump_verts, Matrix4x4_FromArray12FloatD3D(), Matrix4x4_ToBonePose7s(), max, zymtype1header_t::maxs, Mem_Alloc, Mem_AllocType, Mem_Free, model_t::mempool, min, zymtype1header_t::mins, mod_alias, Mod_Alias_CalculateBoundingBox(), mod_alias_force_animated, Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildBaseBonePoses(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_MDLMD2MD3_TraceBox(), Mod_MDLMD2MD3_TraceLine(), Mod_Skeletal_AnimateVertices(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, aliasbone_t::name, animscene_t::name, model_t::name, zymbone_t::name, zymscene_t::name, model_t::normalmaxs, model_t::normalmins, NULL, surfmesh_t::num_blends, model_t::num_bones, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_t::num_poseinvscale, model_t::num_poses, model_t::num_posescale, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, zymtype1header_t::numbones, model_t::numframes, zymtype1header_t::numscenes, zymtype1header_t::numshaders, model_t::numskins, zymtype1header_t::numtris, zymtype1header_t::numverts, origin, aliasbone_t::parent, model_t::PointSuperContents, R_ConcatTransforms(), R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), r_smoothnormals_areaweighting, model_t::radius, zymtype1header_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, model_t::skinscenes, sqrt(), ST_RAND, zymlump_t::start, zymscene_t::start, cvar_t::string, model_t::submodelsurfaces_end, model_t::submodelsurfaces_start, model_t::surfmesh, model_t::synctype, msurface_t::texture, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TracePoint, model_t::type, zymtype1header_t::type, VectorLength, VectorNormalize, model_t::yawmaxs, model_t::yawmins, Z_Free, Z_Malloc, and ZYMSCENEFLAG_NOLOOP.
cvar_t mod_alias_force_animated = {CF_CLIENT | CF_SERVER, "mod_alias_force_animated", "", "if set to an non-empty string, overrides the is-animated flag of any alias models (for benchmarking)"} |
Definition at line 40 of file model_alias.c.
Referenced by Mod_AliasInit(), Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
cvar_t mod_alias_supporttagscale = {CF_CLIENT | CF_SERVER, "mod_alias_supporttagscale", "1", "support scaling factors in bone/tag attachment matrices as supported by MD3"} |
Definition at line 39 of file model_alias.c.
Referenced by Mod_Alias_GetTagMatrix(), and Mod_AliasInit().
float mod_md3_sin[320] |
Definition at line 42 of file model_alias.c.
Referenced by Mod_AliasInit(), Mod_MD3_AnimateVertices(), Mod_Q3BSP_LightPoint(), and Mod_Q3BSP_LoadLightGrid().
Definition at line 45 of file model_alias.c.
Referenced by Mod_Skeletal_AnimateVertices_AllocBuffers(), and Mod_Skeletal_FreeBuffers().
|
static |
Definition at line 44 of file model_alias.c.
Referenced by Mod_Skeletal_AnimateVertices_AllocBuffers(), and Mod_Skeletal_FreeBuffers().
|
extern |
Definition at line 204 of file gl_rmain.c.
Referenced by GL_Main_Init(), and Mod_IDP0_Load().
cvar_t r_skeletal_debugbone = {CF_CLIENT, "r_skeletal_debugbone", "-1", "development cvar for testing skeletal model code"} |
Definition at line 33 of file model_alias.c.
Referenced by Mod_AliasInit(), and Mod_Skeletal_BuildTransforms().
cvar_t r_skeletal_debugbonecomponent = {CF_CLIENT, "r_skeletal_debugbonecomponent", "3", "development cvar for testing skeletal model code"} |
Definition at line 34 of file model_alias.c.
Referenced by Mod_AliasInit(), and Mod_Skeletal_BuildTransforms().
cvar_t r_skeletal_debugbonevalue = {CF_CLIENT, "r_skeletal_debugbonevalue", "100", "development cvar for testing skeletal model code"} |
Definition at line 35 of file model_alias.c.
Referenced by Mod_AliasInit(), and Mod_Skeletal_BuildTransforms().
cvar_t r_skeletal_debugtranslatex = {CF_CLIENT, "r_skeletal_debugtranslatex", "1", "development cvar for testing skeletal model code"} |
Definition at line 36 of file model_alias.c.
Referenced by Mod_AliasInit(), and Mod_Skeletal_BuildTransforms().
cvar_t r_skeletal_debugtranslatey = {CF_CLIENT, "r_skeletal_debugtranslatey", "1", "development cvar for testing skeletal model code"} |
Definition at line 37 of file model_alias.c.
Referenced by Mod_AliasInit(), and Mod_Skeletal_BuildTransforms().
cvar_t r_skeletal_debugtranslatez = {CF_CLIENT, "r_skeletal_debugtranslatez", "1", "development cvar for testing skeletal model code"} |
Definition at line 38 of file model_alias.c.
Referenced by Mod_AliasInit(), and Mod_Skeletal_BuildTransforms().