diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-04-05 00:28:24 +1100 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-04-05 00:28:24 +1100 |
commit | e5495790aeba905505152ad3b6690f459a44df03 (patch) | |
tree | 719095667250b5163c05325452179e6779612b7d /src/animation.h | |
parent | 9baff5661f2ba8b57e1b0794e490e239b7ef80ca (diff) |
close.
Diffstat (limited to 'src/animation.h')
-rw-r--r-- | src/animation.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/animation.h b/src/animation.h index b7c8ca4..81e150a 100644 --- a/src/animation.h +++ b/src/animation.h @@ -29,18 +29,21 @@ typedef struct keyframes { } keyframes; typedef struct animation_spline { - f32_darray timestamps; + f32* timestamps; + size_t n_timestamps; keyframes values; interpolation interpolation; } animation_spline; typedef struct animation_sampler { int current_index; + f32 min; + f32 max; animation_spline animation; } animation_sampler; /** @brief Sample an animation at a given time `t` */ -keyframe animation_sample(animation_sampler sampler, f32 t); +keyframe animation_sample(animation_sampler* sampler, f32 t); typedef struct animation_clip { // A clip contains one or more animation curves @@ -50,4 +53,6 @@ typedef struct animation_clip { animation_sampler* translation; animation_sampler* scale; animation_sampler* weights; -} animation_clip;
\ No newline at end of file +} animation_clip; + +void animation_play(animation_clip* clip);
\ No newline at end of file |