summaryrefslogtreecommitdiff
path: root/AnimationRender/F_Interpolate.h
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2026-03-28 22:14:32 +0200
committerSyndamia <kamen@syndamia.com>2026-03-28 22:14:32 +0200
commit1cc8f72fb1c44e203a324e274038c2883c351fbb (patch)
treebb3f63143fc643fa9d35bcba6566a0d6ef445cab /AnimationRender/F_Interpolate.h
parent6a63e2c0e1f37c502501e1b611e8dc289476c1f2 (diff)
downloadppm_graphics-1cc8f72fb1c44e203a324e274038c2883c351fbb.tar
ppm_graphics-1cc8f72fb1c44e203a324e274038c2883c351fbb.tar.gz
ppm_graphics-1cc8f72fb1c44e203a324e274038c2883c351fbb.zip
feat: Add animation capabilities with linear interpolation
Diffstat (limited to 'AnimationRender/F_Interpolate.h')
-rw-r--r--AnimationRender/F_Interpolate.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/AnimationRender/F_Interpolate.h b/AnimationRender/F_Interpolate.h
new file mode 100644
index 0000000..502fbb4
--- /dev/null
+++ b/AnimationRender/F_Interpolate.h
@@ -0,0 +1,20 @@
+#ifndef F_INTERPOLATE
+#define F_INTERPOLATE
+
+#include "FrameCallback.h"
+#include "../FrameRender/P_TransformCenter.h"
+
+typedef void (*f_interpolate)(void* value, const void* start, const void* end, double progress);
+
+typedef struct Interpolate {
+ f_interpolate interpolate;
+ void* value;
+ const void* startValue;
+ const void* endValue;
+} Interpolate;
+
+FrameCallback* Interpolate_setup(Interpolate obj);
+
+void Interpolate_TransformCenter(TransformCenter* value, const TransformCenter* start, const TransformCenter* end, double progress);
+
+#endif /* F_INTERPOLATE */