#include <BoneInterpolator.h>
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. | |
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 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. |
|
|
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. |
|
|
Returns the maximum of time values across all keyframes (the end of "interesting" data).
|
|
|
Returns the minimum of time values across all keyframes (the start of "interesting" data).
|
|
|
Returns true if this BoneInterpolator has any keys. If there are no keys, then some methods are invalid to call. |
1.2.18