UFO: Alien Invasion
|
Go to the source code of this file.
Functions | |
void | R_AnimAppend (animState_t *as, const model_t *mod, const char *name) |
Appends a new animation to the current running one. More... | |
void | R_AnimChange (animState_t *as, const model_t *mod, const char *name) |
Changes the animation for md2 models. More... | |
void | R_AnimRun (animState_t *as, const model_t *mod, int msec) |
Run the animation of the given model. More... | |
const char * | R_AnimGetName (const animState_t *as, const model_t *mod) |
Get the current running animation for a model. More... | |
void | R_InterpolateTransform (float backlerp, int numframes, const mAliasTagOrientation_t *current, const mAliasTagOrientation_t *old, float *interpolated) |
Interpolate the transform for a model places on a tag of another model. More... | |
void R_AnimAppend | ( | animState_t * | as, |
const model_t * | mod, | ||
const char * | name | ||
) |
Appends a new animation to the current running one.
[in,out] | as | The animation state to append the new animation to |
[in] | mod | The model to append the animation for |
[in] | name | The animation name (from the *.anm file) to append |
Definition at line 84 of file r_mesh_anim.cpp.
References model_s::alias, animState_s::backlerp, animState_s::change, Com_Printf(), animState_s::dt, animState_s::frame, mAliasAnim_s::from, animState_s::ladd, animState_s::lcur, model_s::name, mAliasModel_s::num_anims, animState_s::oldframe, R_AnimAdd(), R_AnimGet(), animState_s::time, mAliasAnim_s::time, and mAliasAnim_s::to.
Referenced by CL_ActorDie(), and CL_ActorDoShoot().
void R_AnimChange | ( | animState_t * | as, |
const model_t * | mod, | ||
const char * | name | ||
) |
Changes the animation for md2 models.
[in,out] | as | Client side animation state of the model |
[in] | mod | Model structure to change the animation for |
[in] | name | Animation state name to switch to |
Definition at line 134 of file r_mesh_anim.cpp.
References model_s::alias, animState_s::backlerp, animState_s::change, Com_Printf(), animState_s::dt, animState_s::frame, mAliasAnim_s::from, animState_s::ladd, animState_s::lcur, LOOPNEXT, model_s::name, mAliasModel_s::num_anims, animState_s::oldframe, R_AnimAdd(), R_AnimGet(), R_AnimGetAliasAnim, animState_s::time, mAliasAnim_s::time, and mAliasAnim_s::to.
Referenced by CL_ActorDie(), CL_ActorDoShoot(), CL_ActorStartShoot(), CL_CameraAppear(), LET_StartIdle(), LET_StartPathMove(), LM_Register(), SEQ_ExecuteModel(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
const char* R_AnimGetName | ( | const animState_t * | as, |
const model_t * | mod | ||
) |
Get the current running animation for a model.
[in] | as | The animation state to check |
[in] | mod | The model to check |
nullptr
if no animation is set or running or the name of the current running animation otherwise. Definition at line 242 of file r_mesh_anim.cpp.
References model_s::alias, animState_s::ladd, animState_s::lcur, MAX_ANIMLIST, mAliasAnim_s::name, mAliasModel_s::num_anims, and R_AnimGetAliasAnim.
Referenced by HUD_UpdateActorCvar(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
void R_AnimRun | ( | animState_t * | as, |
const model_t * | mod, | ||
int | msec | ||
) |
Run the animation of the given model.
[in,out] | as | The animation state to run |
[in] | mod | The model to run the animation for |
[in] | msec | The milliseconds since this was called last |
Definition at line 192 of file r_mesh_anim.cpp.
References model_s::alias, animState_s::backlerp, animState_s::change, animState_s::dt, animState_s::frame, mAliasAnim_s::from, animState_s::ladd, animState_s::lcur, LOOPNEXT, MAX_ANIMLIST, mAliasModel_s::num_anims, animState_s::oldframe, R_AnimGetAliasAnim, animState_s::time, mAliasAnim_s::time, and mAliasAnim_s::to.
Referenced by LE_Think(), LM_AddToSceneOrder(), SEQ_Render3D(), UI_DrawModelNode(), and UI_DrawModelNodeWithUIModel().
void R_InterpolateTransform | ( | float | backLerp, |
int | numframes, | ||
const mAliasTagOrientation_t * | current, | ||
const mAliasTagOrientation_t * | old, | ||
float * | interpolated | ||
) |
Interpolate the transform for a model places on a tag of another model.
[out] | interpolated | This is an array of 16 floats |
[in] | current | The current frame tag data |
[in] | old | The old frame tag data |
[in] | backLerp | the linear interpolation value [0.0,1.0] |
[in] | numframes | The max frames of the tag data |
Definition at line 212 of file r_mesh.cpp.
References mAliasTagOrientation_s::axis, i, mAliasTagOrientation_s::origin, R_ComputeGLMatrixFromTag(), and VectorNormalizeFast().
Referenced by R_CalcTransform(), and R_DrawModelDirect().