Main Page   Class Hierarchy   Compound List   File List   Compound Members  

BoneInterpolator Class Reference

The BoneInterpolator does the real work of joint keyframing. More...

#include <BoneInterpolator.h>

List of all members.

Public Methods

 BoneInterpolator (Bone *targetBone, const AnimationKeys &keys, float startTime, float endTime)
 Constructor for the BoneInterpolator.

 ~BoneInterpolator ()
 Destructor.

bool hasAnyKeys () const
 Returns true if this BoneInterpolator has any keys.

float getStartTime ()
 Returns the minimum of time values across all keyframes (the start of "interesting" data).

float getEndTime ()
 Returns the maximum of time values across all keyframes (the end of "interesting" data).

void timeShift (float shift)
 Shifts the time values of all keyframes by adding the passed time value to all keyframes.

void animate (float t)
 Animates the joint at the given time t.


Detailed Description

The BoneInterpolator does the real work of joint keyframing.

Each BoneInterpolator object references a single Bone (or joint), and all of the keyframes for a single animation. The functionality of this class is limited to simply calculating the position of a single bone given a time value.


Constructor & Destructor Documentation

BoneInterpolator::BoneInterpolator Bone   targetBone,
const AnimationKeys   keys,
float    startTime,
float    endTime
 

Constructor for the BoneInterpolator.

The given keeys must be sorted in ascending time order. The given startTime and endTime are both inclusive times to pull out the keys by.


Member Function Documentation

void BoneInterpolator::animate float    t
 

Animates the joint at the given time t.

If there is "looping" it should be implemented by the caller. If t is greater than the end time for this animation (or less than start time), the joint position will be constant, as the first or last key will be used without interpolation.

If there are no keys, then the translation from the reference matrix is the result of the animation for all t.

float BoneInterpolator::getEndTime  
 

Returns the maximum of time values across all keyframes (the end of "interesting" data).

Precondition:
hasAnyKeys() returns true for ths object

float BoneInterpolator::getStartTime  
 

Returns the minimum of time values across all keyframes (the start of "interesting" data).

Precondition:
hasAnyKeys() returns true for ths object

bool BoneInterpolator::hasAnyKeys  
 

Returns true if this BoneInterpolator has any keys.

If there are no keys, then some methods are invalid to call.


The documentation for this class was generated from the following files:
Generated on Wed May 14 01:38:07 2003 for CG Skeletal Animation Project by doxygen1.2.18