Go to the source code of this file.
Functions | |
void | R_DrawModelDirect (modelInfo_t *mi, modelInfo_t *pmi, const char *tagname) |
void | R_ModelAutoScale (const vec2_t boxSize, modelInfo_t *mi, vec3_t scale, vec3_t center) |
Compute scale and center for a model info data structure. | |
const float * | R_GetTagMatrix (const model_t *mod, const char *tagName) |
Searches the tag data for the given name. |
void R_DrawModelDirect | ( | modelInfo_t * | mi, | |
modelInfo_t * | pmi, | |||
const char * | tagname | |||
) |
Definition at line 191 of file r_mesh.c.
References model_s::alias, rendererData_t::aliasCount, modelInfo_t::backlerp, animState_s::backlerp, modelInfo_t::color, Com_Printf(), animState_s::frame, modelInfo_t::frame, mAliasModel_s::frames, cvar_s::integer, mAliasFrame_s::maxs, modelInfo_t::mesh, mAliasModel_s::meshes, mAliasFrame_s::mins, modelInfo_t::model, modelInfo_t::name, mAliasModel_s::num_frames, dMD2tag_t::num_frames, mAliasMesh_s::num_tris, animState_s::oldframe, modelInfo_t::oldframe, R_AliasModelState(), R_BindTexture, R_CheckError, R_Color(), R_DrawAliasFrameLerp(), R_DrawAliasStatic(), R_DrawBoundingBox(), R_GetTagMatrix(), R_InterpolateTransform(), R_RegisterModelShort(), r_showbox, R_TransformModelDirect(), refdef, viddef_t::rx, viddef_t::ry, modelInfo_t::skin, mAliasModel_s::tagdata, image_s::texnum, vec4_origin, and viddef.
Referenced by R_Draw2DMapMarkers(), R_Draw3DMapMarkers(), UI_DrawItem(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
const float* R_GetTagMatrix | ( | const model_t * | mod, | |
const char * | tagName | |||
) |
Searches the tag data for the given name.
[in] | mod | The model to search the tag data. Can be NULL |
[in] | tagName | The name of the tag to get the matrix for. Might not be NULL |
NULL
is returned. The same is true if the given tag name was not found in the assigned tag data. Definition at line 131 of file r_mesh.c.
References model_s::alias, byte, i, MD2_MAX_TAGNAME, name, dMD2tag_t::num_frames, dMD2tag_t::num_tags, dMD2tag_t::ofs_names, dMD2tag_t::ofs_tags, and mAliasModel_s::tagdata.
Referenced by CL_ActorGetMuzzle(), R_CalcTransform(), and R_DrawModelDirect().
void R_ModelAutoScale | ( | const vec2_t | boxSize, | |
modelInfo_t * | mi, | |||
vec3_t | scale, | |||
vec3_t | center | |||
) |
Compute scale and center for a model info data structure.
[in] | boxSize | The size the model should fit into |
[in,out] | mi | The model info that contains the model that should be scaled |
[out] | scale | The scale vector |
[out] | center | The center of the model (center of the model's bounding box) |
modelInfo_t
struct only holds pointers to the vectors. modelInfo_t
into account Definition at line 171 of file r_mesh.c.
References modelInfo_t::center, model_s::maxs, model_s::mins, modelInfo_t::model, modelInfo_t::scale, VectorCenterFromMinsMaxs(), VectorNegate, and VectorSet.
Referenced by R_Draw2DMapMarkers(), R_Draw3DMapMarkers(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().