diff options
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 |