SLProject 4.0.000
|
Abstract base class for SLAnimationTracks providing time and keyframe functions. More...
#include <SLAnimTrack.h>
Public Member Functions | |
SLAnimTrack (SLAnimation *parent) | |
virtual | ~SLAnimTrack () |
SLAnimKeyframe * | createKeyframe (SLfloat time) |
SLfloat | getKeyframesAtTime (SLfloat time, SLAnimKeyframe **k1, SLAnimKeyframe **k2) const |
virtual void | calcInterpolatedKeyframe (SLfloat time, SLAnimKeyframe *keyframe) const =0 |
virtual void | apply (SLfloat time, SLfloat weight=1.0f, SLfloat scale=1.0f)=0 |
virtual void | drawVisuals (SLSceneView *sv)=0 |
SLint | numKeyframes () const |
SLAnimKeyframe * | keyframe (SLint index) |
Protected Member Functions | |
virtual SLAnimKeyframe * | createKeyframeImpl (SLfloat time)=0 |
Keyframe creator function for derived implementations. More... | |
Protected Attributes | |
SLAnimation * | _animation |
parent animation that created this track More... | |
SLVKeyframe | _keyframes |
keyframe list for this track More... | |
Abstract base class for SLAnimationTracks providing time and keyframe functions.
An animation track is a specialized track that affects a single SLNode or an SLJoint of an SLAnimSkeleton by interpolating its transform. It holds therefore a list of SLKeyframe. For a smooth motion it can interpolate the transform at a given time between two neighboring SLKeyframe.
SLAnimTrack::SLAnimTrack | ( | SLAnimation * | animation | ) |
Constructor
|
virtual |
Destructor
|
pure virtual |
Implemented in SLNodeAnimTrack.
|
pure virtual |
Implemented in SLNodeAnimTrack.
SLAnimKeyframe * SLAnimTrack::createKeyframe | ( | SLfloat | time | ) |
Creates a new keyframed with the passed in timestamp.
|
protectedpure virtual |
Keyframe creator function for derived implementations.
Implemented in SLNodeAnimTrack.
|
pure virtual |
Implemented in SLNodeAnimTrack.
SLfloat SLAnimTrack::getKeyframesAtTime | ( | SLfloat | time, |
SLAnimKeyframe ** | k1, | ||
SLAnimKeyframe ** | k2 | ||
) | const |
Get the two keyframes to the left or the right of the passed in timestamp. If keyframes will wrap around, if there is no keyframe after the passed in time then the k2 result will be the first keyframe in the list. If only one keyframe exists the two values will be equivalent.
SLAnimKeyframe * SLAnimTrack::keyframe | ( | SLint | index | ) |
Getter for keyframes by index.
|
inline |
|
protected |
parent animation that created this track
|
protected |
keyframe list for this track