Lysa  0.0
Lysa 3D Engine
AnimationLibrary Class Reference

Detailed Description

Container for Animation resources.

+ Inheritance diagram for AnimationLibrary:

Public Member Functions

 AnimationLibrary () = default
 
 AnimationLibrary (const AnimationLibrary &animationLibrary)
 
void addAnimation (const std::string &keyName, const std::shared_ptr< Animation > &animation)
 
auto getAnimation (const std::string &keyName) const
 
auto hasAnimation (const std::string &keyName) const
 
const auto & getDefaultAnimationName () const
 
const auto & getAnimations () const
 
- Public Member Functions inherited from UnmanagedResource
 UnmanagedResource ()
 
 UnmanagedResource (const Resource &other)
 
- Public Member Functions inherited from Resource
bool operator== (const Resource &other) const
 
 Resource () = default
 
 Resource (const unique_id id)
 
virtual ~Resource () = default
 

Additional Inherited Members

- Public Attributes inherited from Resource
unique_id id {INVALID_ID}
 

Constructor & Destructor Documentation

AnimationLibrary ( )
default
AnimationLibrary ( const AnimationLibrary &  animationLibrary)
inline

Member Function Documentation

void addAnimation ( const std::string &  keyName,
const std::shared_ptr< Animation > &  animation 
)
inline

Adds the Animation to the library, accessible by the key name.

Parameters
keyNameThe name of the animation
animationThe animation to add
auto getAnimation ( const std::string &  keyName) const
inline

Returns the Animation with the key name.

Parameters
keyNameThe name of the animation to retrieve
Returns
A shared pointer to the animation
const auto& getAnimations ( ) const
inline

Returns all animations in the library

Returns
A reference to the map of animations
const auto& getDefaultAnimationName ( ) const
inline

Returns the name of the default animation

Returns
The name of the default animation
auto hasAnimation ( const std::string &  keyName) const
inline

Returns true if the library stores an Animation with name as the key.

Parameters
keyNameThe name to check
Returns
true if the animation exists in the library