Lysa  0.0
Lysa 3D Engine
AnimationTrack Struct Reference

Detailed Description

An animation track

+ Inheritance diagram for AnimationTrack:

Public Member Functions

 AnimationTrack () = default
 
 AnimationTrack (const AnimationTrack &track)
 
AnimationTrackKeyValue getInterpolatedValue (AnimationLoopMode loopMode, double currentTimeFromStart, bool reverse) 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
 

Public Attributes

AnimationType type
 
AnimationInterpolation interpolation {AnimationInterpolation::LINEAR}
 
bool enabled {true}
 
float duration {0.0f}
 
std::vector< float > keyTime
 
std::vector< float4 > keyValue
 
std::string path
 
- Public Attributes inherited from Resource
unique_id id {INVALID_ID}
 

Constructor & Destructor Documentation

AnimationTrack ( )
default
AnimationTrack ( const AnimationTrack &  track)
inline

Member Function Documentation

AnimationTrackKeyValue getInterpolatedValue ( AnimationLoopMode  loopMode,
double  currentTimeFromStart,
bool  reverse 
) const

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

Parameters
loopModeThe loop mode to apply
currentTimeFromStartThe current time from the start of the animation in seconds
reversetrue if the animation is played in reverse

Member Data Documentation

float duration {0.0f}

Total duration of the track in seconds

bool enabled {true}

true if the track is enabled

AnimationInterpolation interpolation {AnimationInterpolation::LINEAR}

Interpolation type

std::vector<float> keyTime

Keyframe times in seconds

std::vector<float4> keyValue

Keyframe values

std::string path

Path to the resource