SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
SLAnimManager is the central class for all animation handling. More...
#include <SLAnimManager.h>
Private Attributes | |
SLVSkeleton | _skeletons |
all skeleton instances More... | |
SLMAnimation | _animationNamesMap |
map name to animation More... | |
SLMAnimPlayback | _animPlaybackNamesMap |
map name to animation playbacks More... | |
SLVstring | _animationNames |
vector with all animation names More... | |
SLVAnimPlayback | _animPlaybacks |
vector with all animation playbacks More... | |
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.
Definition at line 26 of file SLAnimManager.h.
SLAnimManager::~SLAnimManager | ( | ) |
destructor
Definition at line 14 of file SLAnimManager.cpp.
void SLAnimManager::addNodeAnimation | ( | SLAnimation * | anim | ) |
void SLAnimManager::addSkeleton | ( | SLAnimSkeleton * | skel | ) |
|
inline |
Definition at line 46 of file SLAnimManager.h.
|
inline |
Definition at line 44 of file SLAnimManager.h.
|
inline |
Definition at line 49 of file SLAnimManager.h.
SLAnimPlayback * SLAnimManager::animPlaybackByName | ( | const SLstring & | name | ) |
Returns the playback of a node animation or skeleton by name if it exists.
Definition at line 104 of file SLAnimManager.cpp.
|
inline |
Definition at line 45 of file SLAnimManager.h.
|
inline |
Definition at line 47 of file SLAnimManager.h.
|
inline |
Definition at line 50 of file SLAnimManager.h.
void SLAnimManager::clear | ( | ) |
Clears and deletes all node animations and skeletons.
Definition at line 21 of file SLAnimManager.cpp.
SLAnimation * SLAnimManager::createNodeAnimation | ( | const SLstring & | name, |
SLfloat | duration | ||
) |
Creates a new node animation
name | the animation name |
duration | length of the animation |
Definition at line 84 of file SLAnimManager.cpp.
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.
Definition at line 66 of file SLAnimManager.cpp.
SLAnimation * SLAnimManager::createNodeAnimation | ( | SLfloat | duration | ) |
Creates a new node animation
duration | length of the animation |
Definition at line 48 of file SLAnimManager.cpp.
void SLAnimManager::drawVisuals | ( | SLSceneView * | sv | ) |
Draws the animation visualizations.
Definition at line 153 of file SLAnimManager.cpp.
|
inline |
Definition at line 41 of file SLAnimManager.h.
|
inline |
Definition at line 43 of file SLAnimManager.h.
Advances the time of all enabled animation plays.
Definition at line 118 of file SLAnimManager.cpp.
|
private |
vector with all animation names
Definition at line 60 of file SLAnimManager.h.
|
private |
map name to animation
Definition at line 58 of file SLAnimManager.h.
|
private |
map name to animation playbacks
Definition at line 59 of file SLAnimManager.h.
|
private |
vector with all animation playbacks
Definition at line 61 of file SLAnimManager.h.
|
private |
all skeleton instances
Definition at line 57 of file SLAnimManager.h.