animated_object.h 751 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. *** :: Animated Object ::
  3. ***
  4. *** A skeletally animated object
  5. *** holds information about current animation time
  6. *** Builds a new pose skeleton object on update
  7. ***
  8. **/
  9. #ifndef animated_object_h
  10. #define animated_object_h
  11. #include "cengine.h"
  12. #include "casset.h"
  13. #include "assets/skeleton.h"
  14. typedef struct {
  15. vec3 position;
  16. vec3 scale;
  17. quat rotation;
  18. float animation_time;
  19. asset_hndl renderable;
  20. asset_hndl animation;
  21. asset_hndl skeleton;
  22. frame* pose;
  23. } animated_object;
  24. animated_object* animated_object_new();
  25. void animated_object_delete(animated_object* ao);
  26. void animated_object_load_skeleton(animated_object* ao, asset_hndl ah);
  27. void animated_object_update(animated_object* ao, float timestep);
  28. #endif