r_mesh.h File Reference

This graph shows which files directly or indirectly include this file:

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.

Function Documentation

void R_DrawModelDirect ( modelInfo_t mi,
modelInfo_t pmi,
const char *  tagname 
)
const float* R_GetTagMatrix ( const model_t mod,
const char *  tagName 
)

Searches the tag data for the given name.

Parameters:
[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
Returns:
The tag matrix. In case the model has no tag data assigned, NULL is returned. The same is true if the given tag name was not found in the assigned tag data.
Note:
Matrix format:
  • 0-11: rotation (forward, right, up)
  • 12-14: translation
  • 15:

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.

Parameters:
[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)
Note:
The scale and center vectors are parameters here because the modelInfo_t struct only holds pointers to the vectors.
Todo:
Take the rotation info from 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().


Generated by  doxygen 1.6.2