ZeroZero Game Engine  v0.0
A 3D game engine using Vulkan & Jolt
Public Member Functions | List of all members
AnimationLibrary Class Reference

Detailed Description

Container for Animation resources.

Inheritance diagram for AnimationLibrary:
Resource Object

Public Member Functions

 AnimationLibrary (const string &name="AnimationLibrary")
 
void add (const string &keyName, const shared_ptr< Animation > &animation)
 
auto get (const string &keyName) const
 
auto has (const string &keyName) const
 
const auto & getDefault () const
 
- Public Member Functions inherited from Resource
auto getId () const
 
const auto & getName () const
 
string toString () const override
 
virtual 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 function< void ()> &handler)
 
void emit (const Signal::signal &name, void *params=nullptr)
 

Constructor & Destructor Documentation

AnimationLibrary ( const string &  name = "AnimationLibrary")
inlineexplicit

Creates an AnimationLibrary

Parameters
nameresource name.

Member Function Documentation

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

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

auto get ( const string &  keyName) const
nodiscardinline

Returns the Animation with the key name.

const auto& getDefault ( ) const
nodiscardinline

Returns the name of the default animation

auto has ( const string &  keyName) const
nodiscardinline

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