Toast Engine
Loading...
Searching...
No Matches
animation.hpp File Reference

Keyframe animation asset (.tanim), imported from glTF. More...

#include "core_types.hpp"
#include <cmath>
#include <cstdint>
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <span>
#include <string>
#include <toast/export.hpp>
#include <unordered_map>
#include <vector>
Include dependency graph for animation.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  assets::AnimationTrack
 One animated channel: a keyframe curve driving one component of one node's transform. More...
struct  assets::NodePose
 One node's sampled transform at a point in a clip. More...
struct  assets::AnimationClip
 A named set of tracks that play together. More...
struct  assets::Skin
 A skeleton: the joint nodes a skinned mesh binds to. More...
class  assets::Animation
 A set of clips plus the skins they pose. More...

Enumerations

enum class  assets::Interpolation : uint8_t { linear , step , cubic_spline }
 How a sampler interpolates between two keyframes, matching glTF's three modes. More...
enum class  assets::TrackTarget : uint8_t { translation , rotation , scale }
 Which part of a node's transform a track drives.

Variables

constexpr uint32_t assets::_detail::animation_format_version = 3
 Binary layout version for .tanim; readers reject anything they don't recognise.

Detailed Description

Keyframe animation asset (.tanim), imported from glTF.

Author
dario

One clip plus the skins it poses, one file per animation the glTF defines. Sampled by toast::AnimationPlayer, GPU-skinned by renderer::SkinningPass

Bump _detail::animation_format_version on any layout change

Enumeration Type Documentation

◆ Interpolation

enum class assets::Interpolation : uint8_t
strong

How a sampler interpolates between two keyframes, matching glTF's three modes.

Enumerator
cubic_spline 

Cubic Hermite. Each keyframe stores three values (in-tangent, value, out-tangent) rather than one, so a cubic track's value array is 3x as long as its time array