|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Stores skeletal animation data including keyframes and bone transforms. More...
#include <aeongames/Animation.hpp>


Public Member Functions | |
| DLL void | LoadFromMemory (const void *aBuffer, size_t aBufferSize) final |
| Load animation data from a memory buffer. | |
| DLL void | Unload () final |
| Unload animation data and free resources. | |
| DLL uint32_t | GetFrameRate () const |
| Get the frame rate of the animation. | |
| 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 double | AddTimeToSample (double aSample, double aTime) const |
| Advance a sample position by a time delta. | |
| DLL const Transform | GetTransform (size_t aBoneIndex, double aSample) const |
| Get the transform for a specific bone at a given sample. | |
| DLL void | LoadFromPBMsg (const AnimationMsg &aAnimationMsg) |
| Load animation data from a protobuf message. | |
| Public Member Functions inherited from AeonGames::Resource | |
| virtual | ~Resource () |
| Virtual destructor. | |
| DLL void | LoadFromId (uint32_t aId) |
| Load the resource identified by a numeric id. | |
| DLL void | LoadFromFile (const std::string &aFilename) |
| Load the resource from a file on disk. | |
| DLL size_t | GetConsecutiveId () const |
| Get the Consecutive Id for the resource object. | |
Stores skeletal animation data including keyframes and bone transforms.
Definition at line 28 of file Animation.hpp.
| double AeonGames::Animation::AddTimeToSample | ( | double | aSample, |
| double | aTime ) const |
Advance a sample position by a time delta.
| aSample | Current sample position. |
| aTime | Time delta in seconds. |
Definition at line 116 of file Animation.cpp.
| double AeonGames::Animation::GetDuration | ( | ) | const |
Get the total duration of the animation.
Definition at line 101 of file Animation.cpp.
| uint32_t AeonGames::Animation::GetFrameRate | ( | ) | const |
Get the frame rate of the animation.
Definition at line 96 of file Animation.cpp.
| double AeonGames::Animation::GetSample | ( | double | aTime | ) | const |
Get a normalized sample position for a given time.
| aTime | Time in seconds. |
The sample integral part represents the initial frame, the fractional part is the interpolation between the initial frame and the next.
Definition at line 106 of file Animation.cpp.
| const Transform AeonGames::Animation::GetTransform | ( | size_t | aBoneIndex, |
| double | aSample ) const |
Get the transform for a specific bone at a given sample.
| aBoneIndex | Index of the bone in the skeleton. |
| aSample | Sample position within the animation. |
modf should guarantee interpolation to be in the range [0.0,1.0)
Definition at line 121 of file Animation.cpp.
|
finalvirtual |
Load animation data from a memory buffer.
| aBuffer | Pointer to the buffer containing animation data. |
| aBufferSize | Size of the buffer in bytes. |
Implements AeonGames::Resource.
Definition at line 42 of file Animation.cpp.
| void AeonGames::Animation::LoadFromPBMsg | ( | const AnimationMsg & | aAnimationMsg | ) |
Load animation data from a protobuf message.
| aAnimationMsg | Protobuf message containing animation data. |
Definition at line 47 of file Animation.cpp.
|
finalvirtual |
Unload animation data and free resources.
Implements AeonGames::Resource.
Definition at line 86 of file Animation.cpp.