SLProject 4.0.000
SLNodeAnimTrack Class Reference

Specialized animation track for node animations. More...

#include <SLAnimTrack.h>

Inheritance diagram for SLNodeAnimTrack:
[legend]

Public Member Functions

 SLNodeAnimTrack (SLAnimation *parent)
 
virtual ~SLNodeAnimTrack ()
 
SLTransformKeyframecreateNodeKeyframe (SLfloat time)
 
void animatedNode (SLNode *target)
 
SLNodeanimatedNode ()
 
virtual void calcInterpolatedKeyframe (SLfloat time, SLAnimKeyframe *keyframe) const
 
virtual void apply (SLfloat time, SLfloat weight=1.0f, SLfloat scale=1.0f)
 
virtual void applyToNode (SLNode *node, SLfloat time, SLfloat weight=1.0f, SLfloat scale=1.0f)
 
virtual void drawVisuals (SLSceneView *sv)
 Draws all visualizations of node animations. More...
 
void interpolationCurve (SLCurve *curve)
 
void translationInterpolation (SLAnimInterpolation interp)
 
- Public Member Functions inherited from SLAnimTrack
 SLAnimTrack (SLAnimation *parent)
 
virtual ~SLAnimTrack ()
 
SLAnimKeyframecreateKeyframe (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
 
SLAnimKeyframekeyframe (SLint index)
 

Protected Member Functions

void buildInterpolationCurve () const
 
virtual SLAnimKeyframecreateKeyframeImpl (SLfloat time)
 
virtual SLAnimKeyframecreateKeyframeImpl (SLfloat time)=0
 Keyframe creator function for derived implementations. More...
 

Protected Attributes

SLNode_animatedNode
 the target node for this track_nodeID More...
 
SLCurve_interpolationCurve
 the translation interpolation curve More...
 
SLAnimInterpolation _translationInterpolation
 interpolation mode for translations (Bezier or linear) More...
 
SLbool _rebuildInterpolationCurve
 dirty flag of the Bezier curve More...
 
- Protected Attributes inherited from SLAnimTrack
SLAnimation_animation
 parent animation that created this track More...
 
SLVKeyframe _keyframes
 keyframe list for this track More...
 

Detailed Description

Specialized animation track for node animations.

Allows for translation, scale and rotation parameters to be animated. Also allows for either linear or Bezier interpolation of the position parameter in the track.

Constructor & Destructor Documentation

◆ SLNodeAnimTrack()

SLNodeAnimTrack::SLNodeAnimTrack ( SLAnimation animation)

Constructor for specialized NodeAnimationTrack

◆ ~SLNodeAnimTrack()

SLNodeAnimTrack::~SLNodeAnimTrack ( )
virtual

Destructor

Member Function Documentation

◆ animatedNode() [1/2]

SLNode * SLNodeAnimTrack::animatedNode ( )
inline

◆ animatedNode() [2/2]

void SLNodeAnimTrack::animatedNode ( SLNode target)
inline

◆ apply()

void SLNodeAnimTrack::apply ( SLfloat  time,
SLfloat  weight = 1.0f,
SLfloat  scale = 1.0f 
)
virtual

Applies the animation with the input timestamp to the set animation target if it exists.

Implements SLAnimTrack.

◆ applyToNode()

void SLNodeAnimTrack::applyToNode ( SLNode node,
SLfloat  time,
SLfloat  weight = 1.0f,
SLfloat  scale = 1.0f 
)
virtual

Applies the animation to the input node with the input timestamp and weight.

◆ buildInterpolationCurve()

void SLNodeAnimTrack::buildInterpolationCurve ( ) const
protected

Rebuilds the translation interpolation Bezier curve.

◆ calcInterpolatedKeyframe()

void SLNodeAnimTrack::calcInterpolatedKeyframe ( SLfloat  time,
SLAnimKeyframe keyframe 
) const
virtual

Calculates a new keyframe based on the input time and interpolation functions.

Implements SLAnimTrack.

◆ createKeyframeImpl()

SLAnimKeyframe * SLNodeAnimTrack::createKeyframeImpl ( SLfloat  time)
protectedvirtual

Implementation for the keyframe creation function.

Implements SLAnimTrack.

◆ createNodeKeyframe()

SLTransformKeyframe * SLNodeAnimTrack::createNodeKeyframe ( SLfloat  time)

Creates a new SLTransformKeyframe at 'time'.

◆ drawVisuals()

void SLNodeAnimTrack::drawVisuals ( SLSceneView sv)
virtual

Draws all visualizations of node animations.

Implements SLAnimTrack.

◆ interpolationCurve()

void SLNodeAnimTrack::interpolationCurve ( SLCurve curve)

setter for the interpolation curve

◆ translationInterpolation()

void SLNodeAnimTrack::translationInterpolation ( SLAnimInterpolation  interp)
inline

Member Data Documentation

◆ _animatedNode

SLNode* SLNodeAnimTrack::_animatedNode
protected

the target node for this track_nodeID

◆ _interpolationCurve

SLCurve* SLNodeAnimTrack::_interpolationCurve
mutableprotected

the translation interpolation curve

◆ _rebuildInterpolationCurve

SLbool SLNodeAnimTrack::_rebuildInterpolationCurve
protected

dirty flag of the Bezier curve

◆ _translationInterpolation

SLAnimInterpolation SLNodeAnimTrack::_translationInterpolation
protected

interpolation mode for translations (Bezier or linear)


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