Lysa  0.0
Lysa 3D Engine
Animation Class Reference

Detailed Description

Holds data that can be used to animate anything.

+ Inheritance diagram for Animation:

Classes

struct  Track
 
struct  TrackKeyValue
 

Public Typedefs

using Value = float4
 

Public Member Functions

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

Member Typedef Documentation

using Value = float4

Constructor & Destructor Documentation

Animation ( const std::string &  name)

Creates an Animation

Parameters
nameresource name.
Animation ( uint32  tracksCount,
const std::string &  name 
)

Creates an Animation

Parameters
tracksCountnumber of tracks to allocate
nameresource name.

Member Function Documentation

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

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

auto getLoopMode ( ) const
inline

Returns the looping mode

auto& getTrack ( const uint32  index)
inline

Returns a given track

auto getTracksCount ( ) const
inline

Returns the number of tracks

void setLoopMode ( const AnimationLoopMode  mode)
inline

Sets the looping mode