ScummVM API documentation
hpl::cAnimationTrack Class Reference

Public Member Functions

 cAnimationTrack (const tString &asName, tAnimTransformFlag aTransformFlags, cAnimation *apParent)
 
void ResizeKeyFrames (int alSize)
 
cKeyFrameCreateKeyFrame (float afTime)
 
cKeyFrameGetKeyFrame (int alIndex)
 
int GetKeyFrameNum ()
 
tAnimTransformFlag GetTransformFlags ()
 
void ApplyToNode (cNode3D *apNode, float afTime, float afWeight)
 
cKeyFrame GetInterpolatedKeyFrame (float afTime)
 
float GetKeyFramesAtTime (float afTime, cKeyFrame **apKeyFrameA, cKeyFrame **apKeyFrameB)
 
const char * GetName ()
 
void SetNodeIndex (int alIndex)
 
int GetNodeIndex ()
 

Member Function Documentation

◆ CreateKeyFrame()

cKeyFrame* hpl::cAnimationTrack::CreateKeyFrame ( float  afTime)

Creates a new key frame. These should be added in sequential order.

Parameters
afTimethe time for the key frame.

◆ ApplyToNode()

void hpl::cAnimationTrack::ApplyToNode ( cNode3D apNode,
float  afTime,
float  afWeight 
)

Apply the animation to a node. The method uses Node->AddXXX() so Update matrix must be called for the transformation to be applied.

Parameters
apNodeThe node with it's base pose
afTimeThe time at which to apply the animation
afWeightThe weight of the animation, a value from 0 to 1.

◆ GetInterpolatedKeyFrame()

cKeyFrame hpl::cAnimationTrack::GetInterpolatedKeyFrame ( float  afTime)

Get a KeyFrame that contains an interpolated value.

Parameters
afTimeThe time from wihcih to create the keyframe.

◆ GetKeyFramesAtTime()

float hpl::cAnimationTrack::GetKeyFramesAtTime ( float  afTime,
cKeyFrame **  apKeyFrameA,
cKeyFrame **  apKeyFrameB 
)

Gets key frames between for a specific time.

Parameters
afTimeThe time
&apKeyFrameAThe frame that is equal to or before time
&apKeyFrameBThe frame that is after time.
Returns
Weight of the different frames. 0 = 100% A, 1 = 100% B 0.5 = 50% A and 50% B

The documentation for this class was generated from the following file: