Toast Engine
Loading...
Searching...
No Matches
assets::AnimationClip Struct Reference

A named set of tracks that play together. More...

#include <animation.hpp>

Public Member Functions

auto sample (float time) const -> std::unordered_map< std::string, NodePose >
 Samples every track at time, grouped per target node.
auto wrap (float time) const -> float
 Wraps time into [0, duration], for looping playback.

Public Attributes

std::string name
float duration = 0.0f
 seconds; the largest time across all tracks
std::vector< AnimationTrack > tracks

Detailed Description

A named set of tracks that play together.

Member Function Documentation

◆ sample()

auto assets::AnimationClip::sample ( float time) const -> std::unordered_map< std::string, NodePose >
nodiscard

Samples every track at time, grouped per target node.

Parameters
timeSeconds from clip start; not wrapped, so the caller decides whether to loop
Returns
one entry per node this clip actually drives, keyed by node name

The documentation for this struct was generated from the following files:
  • engine/src/toast/assets/animation.hpp
  • engine/src/toast/assets/animation.cpp