Atoms Crowd  4.1.0
Atoms::AnimationClips Class Reference

Animation clips manager. More...

#include <AnimationClips.h>

Public Member Functions

AnimationClipCPtr animationClip (const std::string &name) const
 Return an animation clips. More...
 
AnimationClipPtr animationClip (const std::string &name)
 Return an animation clips. More...
 
AnimationClipPtr addAnimationClip (const std::string &name, const std::string &filePath, bool replace=true)
 Add an animation clip to the map. More...
 
AnimationClipPtr addAnimationClip (const std::string &name, AnimationClipPtr &clipPtr, bool replace=true)
 Add an animation clip to the map. More...
 
void removeAnimationClip (const std::string &name)
 Remove an animation clip from the map. More...
 
std::vector< std::string > animationClipNames ()
 Get all animation clip names. More...
 
bool animationClipExists (const std::string &name)
 Check if an animation clip exists. More...
 
unsigned int numAnimationClips ()
 Get number of animation clips.
 
void clear ()
 Remove all animation clips.
 
void registerLoaderCallback (std::function< AnimationClipPtr(const char *)> &callback)
 

Static Public Member Functions

static AnimationClipsinstance ()
 Singleton access.
 

Detailed Description

Animation clips manager.

This class store animation clips.

Member Function Documentation

◆ addAnimationClip() [1/2]

AnimationClipPtr Atoms::AnimationClips::addAnimationClip ( const std::string &  name,
AnimationClipPtr clipPtr,
bool  replace = true 
)

Add an animation clip to the map.

Parameters
nameanimation clip name \patam filePath path to clip file

◆ addAnimationClip() [2/2]

AnimationClipPtr Atoms::AnimationClips::addAnimationClip ( const std::string &  name,
const std::string &  filePath,
bool  replace = true 
)

Add an animation clip to the map.

Parameters
nameanimation clip name \patam filePath path to clip file

◆ animationClip() [1/2]

AnimationClipPtr Atoms::AnimationClips::animationClip ( const std::string &  name)

Return an animation clips.

Parameters
animationClipanimation clip name
Returns
Pointer to the animation clip stored inside this class

◆ animationClip() [2/2]

AnimationClipCPtr Atoms::AnimationClips::animationClip ( const std::string &  name) const

Return an animation clips.

Parameters
animationClipanimation clip name
Returns
Pointer to the animation clip stored inside this class

◆ animationClipExists()

bool Atoms::AnimationClips::animationClipExists ( const std::string &  name)

Check if an animation clip exists.

Parameters
nameanimation clip name
Returns
Return true if the animation clip exists

◆ animationClipNames()

std::vector<std::string> Atoms::AnimationClips::animationClipNames ( )

Get all animation clip names.

Returns
List of all animation clip names

◆ removeAnimationClip()

void Atoms::AnimationClips::removeAnimationClip ( const std::string &  name)

Remove an animation clip from the map.

Parameters
nameanination clip name

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