16#ifndef AEONGAMES_ANIMATION_H
17#define AEONGAMES_ANIMATION_H
22#include "aeongames/Resource.hpp"
36 DLL
void LoadFromMemory (
const void* aBuffer,
size_t aBufferSize )
final;
48 DLL
double GetSample (
double aTime )
const;
63 std::string mFilename;
67 std::vector<std::vector<Transform >> mFrames;
DLL double AddTimeToSample(double aSample, double aTime) const
Advance a sample position by a time delta.
DLL double GetDuration() const
Get the total duration of the animation.
DLL double GetSample(double aTime) const
Get a normalized sample position for a given time.
DLL void Unload() final
Unload animation data and free resources.
DLL void LoadFromMemory(const void *aBuffer, size_t aBufferSize) final
Load animation data from a memory buffer.
DLL void LoadFromPBMsg(const AnimationMsg &aAnimationMsg)
Load animation data from a protobuf message.
DLL const Transform GetTransform(size_t aBoneIndex, double aSample) const
Get the transform for a specific bone at a given sample.
DLL uint32_t GetFrameRate() const
Get the frame rate of the animation.
Base class for loadable engine resources.
<- This is here just for the literals