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

Detailed Description

Holds data that can be used to animate anything.

Inheritance diagram for Animation:
Resource Object

Classes

struct  Track
 
struct  TrackKeyValue
 

Public Member Functions

 Animation (const string &name)
 
 Animation (uint32_t tracksCount, const string &name)
 
void setLoopMode (const AnimationLoopMode mode)
 
auto getLoopMode () const
 
auto getTracksCount () const
 
auto & getTrack (const uint32_t index)
 
TrackKeyValue getInterpolatedValue (uint32_t trackIndex, double currentTimeFromStart, bool reverse=false) 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

Animation ( const string &  name)
explicit

Creates an Animation

Parameters
nameresource name.
Animation ( uint32_t  tracksCount,
const string &  name 
)
explicit

Creates an Animation

Parameters
tracksCountnumber of tracks to allocate
nameresource name.

Member Function Documentation

TrackKeyValue getInterpolatedValue ( uint32_t  trackIndex,
double  currentTimeFromStart,
bool  reverse = false 
) const
nodiscard

Returns the interpolated value at the given time (in seconds, from start of the animation) for a track.

auto getLoopMode ( ) const
nodiscardinline

Returns the looping mode

auto& getTrack ( const uint32_t  index)
nodiscardinline

Returns a given track

auto getTracksCount ( ) const
nodiscardinline

Returns the number of tracks

void setLoopMode ( const AnimationLoopMode  mode)
inline

Sets the looping mode