2022-12-27 17:54:39 -06:00
|
|
|
#ifndef ANIM_H
|
|
|
|
#define ANIM_H
|
|
|
|
|
|
|
|
struct keyframe {
|
2023-05-12 13:22:05 -05:00
|
|
|
double time;
|
|
|
|
double val;
|
2022-12-27 17:54:39 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
struct anim {
|
2023-05-12 13:22:05 -05:00
|
|
|
struct keyframe *frames;
|
|
|
|
int loop;
|
|
|
|
int interp;
|
2022-12-27 17:54:39 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
struct anim make_anim();
|
|
|
|
struct anim anim_add_keyframe(struct anim a, struct keyframe f);
|
|
|
|
double anim_val(struct anim anim, double t);
|
|
|
|
|
|
|
|
#endif
|