summaryrefslogtreecommitdiff
path: root/src/animation.h
diff options
context:
space:
mode:
authoromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
committeromnisci3nce <omniscient.oce@gmail.com>2024-07-12 12:47:07 +1000
commitf74cf52946f4e569a26bc81105537b40be95c2c7 (patch)
tree1d000367350d0e28eb7cfbc800286a0ed30a4e6c /src/animation.h
parentfedba7ff68924ff50022405fc9103a5acf7013fe (diff)
wip: big makeover
Diffstat (limited to 'src/animation.h')
-rw-r--r--src/animation.h106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/animation.h b/src/animation.h
index 5462e65..9c7faab 100644
--- a/src/animation.h
+++ b/src/animation.h
@@ -6,67 +6,67 @@
KITC_DECL_TYPED_ARRAY(f32)
-typedef enum interpolation { INTERPOLATION_LINEAR, INTERPOLATION_COUNT } interpolation;
+// typedef enum interpolation { INTERPOLATION_LINEAR, INTERPOLATION_COUNT } interpolation;
-typedef enum keyframe_kind {
- KEYFRAME_ROTATION,
- KEYFRAME_TRANSLATION,
- KEYFRAME_SCALE,
- KEYFRAME_WEIGHTS,
-} keyframe_kind;
+// typedef enum keyframe_kind {
+// KEYFRAME_ROTATION,
+// KEYFRAME_TRANSLATION,
+// KEYFRAME_SCALE,
+// KEYFRAME_WEIGHTS,
+// } keyframe_kind;
-typedef union keyframe {
- quat rotation;
- vec3 translation;
- vec3 scale;
- float* weights;
-} keyframe;
+// typedef union keyframe {
+// quat rotation;
+// vec3 translation;
+// vec3 scale;
+// float* weights;
+// } keyframe;
-typedef struct keyframes {
- keyframe_kind kind;
- keyframe* values;
- size_t count;
-} keyframes;
+// typedef struct keyframes {
+// keyframe_kind kind;
+// keyframe* values;
+// size_t count;
+// } keyframes;
-typedef struct joint {
- char* name; // optional
- transform transform_components;
- mat4 inverse_bind_matrix;
- mat4 local_transform;
-} joint;
+// typedef struct joint {
+// char* name; // optional
+// transform transform_components;
+// mat4 inverse_bind_matrix;
+// mat4 local_transform;
+// } joint;
-typedef struct animation_spline {
- f32* timestamps;
- size_t n_timestamps;
- keyframes values;
- interpolation interpolation;
-} animation_spline;
+// typedef struct animation_spline {
+// 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;
+// 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);
+// /** @brief Sample an animation at a given time `t` */
+// keyframe animation_sample(animation_sampler* sampler, f32 t);
-typedef struct animation_clip {
- // A clip contains one or more animation curves
- // for now I think we can just enumerate all of the properties (assuming *only* one per type is in
- // a clip) NULL = this property is not animated in this clip
- animation_sampler* rotation;
- animation_sampler* translation;
- animation_sampler* scale;
- animation_sampler* weights;
-} animation_clip;
+// typedef struct animation_clip {
+// // A clip contains one or more animation curves
+// // for now I think we can just enumerate all of the properties (assuming *only* one per type is in
+// // a clip) NULL = this property is not animated in this clip
+// animation_sampler* rotation;
+// animation_sampler* translation;
+// animation_sampler* scale;
+// animation_sampler* weights;
+// } animation_clip;
-typedef struct skinned_animation {
- mat4* joint_matrices;
- size_t n_joints;
-} skinned_animation;
+// typedef struct skinned_animation {
+// mat4* joint_matrices;
+// size_t n_joints;
+// } skinned_animation;
-// void animation_update_joint_matrices(animation_clip* )
+// // void animation_update_joint_matrices(animation_clip* )
-void animation_play(animation_clip* clip); \ No newline at end of file
+// void animation_play(animation_clip* clip);