|
Toast Engine
|
One animated channel: a keyframe curve driving one component of one node's transform. More...
#include <animation.hpp>
Public Member Functions | |
| auto | keyframeCount () const -> size_t |
| auto | sampleVec3 (float time) const -> glm::vec3 |
Evaluates this track at time, in seconds from clip start. | |
| auto | sampleQuat (float time) const -> glm::quat |
Public Attributes | |
| std::string | target_node |
| node name, resolved against the instantiated tree at playback time | |
| TrackTarget | target = TrackTarget::translation |
| Interpolation | interpolation = Interpolation::linear |
| std::vector< float > | times |
| std::vector< glm::vec3 > | vec3_values |
| std::vector< glm::quat > | quat_values |
One animated channel: a keyframe curve driving one component of one node's transform.
Times are seconds from clip start. Only one of vec3_values / quat_values is populated, chosen by target
|
inlinenodiscard |
|
nodiscard |
Evaluates this track at time, in seconds from clip start.
Clamps rather than loops - looping is the player's decision and it wraps the time first. A track with no keys returns identity, so a malformed one poses to something sane rather than to garbage