SLProject 4.0.000
SLAnimManager Class Reference

SLAnimManager is the central class for all animation handling. More...

#include <SLAnimManager.h>

Public Member Functions

 ~SLAnimManager ()
 destructor More...
 
void addSkeleton (SLAnimSkeleton *skel)
 Add a skeleton to the skeleton vector. More...
 
void addNodeAnimation (SLAnimation *anim)
 
SLbool hasNodeAnimations ()
 
SLAnimPlaybacknodeAnimPlayback (const SLstring &name)
 Returns the playback of a node animation by name if it exists. More...
 
SLAnimPlaybackallAnimPlayback (SLuint ix)
 
SLAnimPlaybacklastAnimPlayback ()
 
SLAnimationcreateNodeAnimation (SLfloat duration)
 
SLAnimationcreateNodeAnimation (const SLstring &name, SLfloat duration)
 
SLAnimationcreateNodeAnimation (const SLstring &name, SLfloat duration, SLbool enabled, SLEasingCurve easing, SLAnimLooping looping)
 
SLMAnimationanimations ()
 
SLVSkeletonskeletons ()
 
SLVstringallAnimNames ()
 
SLVAnimPlaybackallAnimPlaybacks ()
 
SLbool update (SLfloat elapsedTimeSec)
 Advances the time of all enabled animation plays. More...
 
void drawVisuals (SLSceneView *sv)
 Draws the animation visualizations. More...
 
void clear ()
 Clears and deletes all node animations and skeletons. More...
 

Private Attributes

SLVSkeleton _skeletons
 all skeleton instances More...
 
SLMAnimation _nodeAnimations
 node animations More...
 
SLMAnimPlayback _nodeAnimPlaybacks
 node animation playbacks More...
 
SLVstring _allAnimNames
 vector with all animation names More...
 
SLVAnimPlayback _allAnimPlaybacks
 vector with all animation playbacks More...
 

Detailed Description

SLAnimManager is the central class for all animation handling.

A single instance of this class is hold by the SLScene instance and is responsible for updating the enabled animations and to manage their life time. If keeps a list of all skeletons and node animations and also holds a list of all animation playback controllers. The update of all animations is done before the rendering of all SLSceneView in SLScene::updateIfAllViewsGotPainted by calling the SLAnimManager::update.

Constructor & Destructor Documentation

◆ ~SLAnimManager()

SLAnimManager::~SLAnimManager ( )

destructor

Member Function Documentation

◆ addNodeAnimation()

void SLAnimManager::addNodeAnimation ( SLAnimation anim)

◆ addSkeleton()

void SLAnimManager::addSkeleton ( SLAnimSkeleton skel)

Add a skeleton to the skeleton vector.

◆ allAnimNames()

SLVstring & SLAnimManager::allAnimNames ( )
inline

◆ allAnimPlayback()

SLAnimPlayback * SLAnimManager::allAnimPlayback ( SLuint  ix)
inline

◆ allAnimPlaybacks()

SLVAnimPlayback & SLAnimManager::allAnimPlaybacks ( )
inline

◆ animations()

SLMAnimation & SLAnimManager::animations ( )
inline

◆ clear()

void SLAnimManager::clear ( )

Clears and deletes all node animations and skeletons.

◆ createNodeAnimation() [1/3]

SLAnimation * SLAnimManager::createNodeAnimation ( const SLstring name,
SLfloat  duration 
)

Creates a new node animation

Parameters
namethe animation name
durationlength of the animation

◆ createNodeAnimation() [2/3]

SLAnimation * SLAnimManager::createNodeAnimation ( const SLstring name,
SLfloat  duration,
SLbool  enabled,
SLEasingCurve  easing,
SLAnimLooping  looping 
)

Creates new SLAnimation istance for node animations. It will already create and set parameters for the respective SLAnimPlayback.

◆ createNodeAnimation() [3/3]

SLAnimation * SLAnimManager::createNodeAnimation ( SLfloat  duration)

Creates a new node animation

Parameters
durationlength of the animation

◆ drawVisuals()

void SLAnimManager::drawVisuals ( SLSceneView sv)

Draws the animation visualizations.

◆ hasNodeAnimations()

SLbool SLAnimManager::hasNodeAnimations ( )
inline

◆ lastAnimPlayback()

SLAnimPlayback * SLAnimManager::lastAnimPlayback ( )
inline

◆ nodeAnimPlayback()

SLAnimPlayback * SLAnimManager::nodeAnimPlayback ( const SLstring name)

Returns the playback of a node animation by name if it exists.

◆ skeletons()

SLVSkeleton & SLAnimManager::skeletons ( )
inline

◆ update()

SLbool SLAnimManager::update ( SLfloat  elapsedTimeSec)

Advances the time of all enabled animation plays.

Member Data Documentation

◆ _allAnimNames

SLVstring SLAnimManager::_allAnimNames
private

vector with all animation names

◆ _allAnimPlaybacks

SLVAnimPlayback SLAnimManager::_allAnimPlaybacks
private

vector with all animation playbacks

◆ _nodeAnimations

SLMAnimation SLAnimManager::_nodeAnimations
private

node animations

◆ _nodeAnimPlaybacks

SLMAnimPlayback SLAnimManager::_nodeAnimPlaybacks
private

node animation playbacks

◆ _skeletons

SLVSkeleton SLAnimManager::_skeletons
private

all skeleton instances


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