22 lines
537 B
C
22 lines
537 B
C
#ifndef ANIMATION_H
|
|
#define ANIMATION_H
|
|
|
|
#include "model.h"
|
|
|
|
typedef struct {
|
|
mat4_t *bone_matrices;
|
|
const bone_t *current, *next;
|
|
uint32_t current_keyframe, next_keyframe;
|
|
uint32_t duration_us, elapsed_us;
|
|
} animation_state_t;
|
|
|
|
animation_state_t animation_init(const model_t *model);
|
|
void animation_cleanup(animation_state_t *state);
|
|
|
|
void animation_start(
|
|
animation_state_t *state, const model_t *model, uint32_t start_keyframe);
|
|
void animation_update(
|
|
animation_state_t *state, const model_t *model, uint32_t dt_us);
|
|
|
|
#endif
|