Lysa  0.0
Lysa 3D Engine
AnimationLibrary Class Reference

Detailed Description

Container for Animation resources.

+ Inheritance diagram for AnimationLibrary:

Public Member Functions

 AnimationLibrary (const std::string &name="AnimationLibrary")
 
void add (const std::string &keyName, const std::shared_ptr< Animation > &animation)
 
auto get (const std::string &keyName) const
 
auto has (const std::string &keyName) const
 
const auto & getDefault () const
 
- Public Member Functions inherited from Resource
 Resource (const std::string &name)
 
auto getId () const
 
const auto & getName () const
 
bool operator== (const Resource &other) const
 
bool operator< (const Resource &other) const
 
bool operator> (const Resource &other) const
 
virtual std::shared_ptr< Resource > duplicate () const
 
- Public Member Functions inherited from Object
void connect (const Signal::signal &name, const Signal::Handler &handler)
 
void connect (const Signal::signal &name, const std::function< void ()> &handler)
 
void emit (const Signal::signal &name, void *params=nullptr)
 
virtual std::string toString () const
 
 Object () = default
 
virtual ~Object () = default
 

Constructor & Destructor Documentation

AnimationLibrary ( const std::string &  name = "AnimationLibrary")
inline

Creates an AnimationLibrary

Parameters
nameresource name.

Member Function Documentation

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

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

auto get ( const std::string &  keyName) const
inline

Returns the Animation with the key name.

const auto& getDefault ( ) const
inline

Returns the name of the default animation

auto has ( const std::string &  keyName) const
inline

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