SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
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.
Definition at line 31 of file SLAnimTrack.h.
SLAnimTrack::SLAnimTrack | ( | SLAnimation * | animation | ) |
Constructor
Definition at line 18 of file SLAnimTrack.cpp.
|
virtual |
Destructor
Definition at line 26 of file SLAnimTrack.cpp.
|
pure virtual |
Implemented in SLNodeAnimTrack.
|
pure virtual |
Implemented in SLNodeAnimTrack.
SLAnimKeyframe * SLAnimTrack::createKeyframe | ( | SLfloat | time | ) |
Creates a new keyframed with the passed in timestamp.
Definition at line 38 of file SLAnimTrack.cpp.
|
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.
Definition at line 62 of file SLAnimTrack.cpp.
SLAnimKeyframe * SLAnimTrack::keyframe | ( | SLint | index | ) |
|
inline |
Definition at line 47 of file SLAnimTrack.h.
|
protected |
parent animation that created this track
Definition at line 54 of file SLAnimTrack.h.
|
protected |
keyframe list for this track
Definition at line 55 of file SLAnimTrack.h.