You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4KB

  1. #ifndef LICKS_DYNAMIC_SEQUENCER_H
  2. #define LICKS_DYNAMIC_SEQUENCER_H
  3. #include <stdint.h>
  4. #include "linalg.h"
  5. #include "ik.h"
  6. typedef enum { seq_nop=0, seq_move_body, seq_rotate_body, seq_move_leg, seq_rotate_leg, seq_move_leg_parabolic, seq_walk } sequencer_command;
  7. typedef struct {
  8. sequencer_command command;
  9. uint32_t frame_delay;
  10. uint32_t frame_duration;
  11. uint32_t frame_t;
  12. vector3d arg_vector3d;
  13. int arg_int;
  14. double arg_double;
  15. void *arg_pointer;
  16. void *arg_pointer2;
  17. } sequencer_entry;
  18. typedef struct {
  19. double step_height;
  20. int step_duration;
  21. vector3d step_direction;
  22. double step_rotation;
  23. vector3d last_step_direction;
  24. double last_step_rotation;
  25. } sequencer_walk_parameters;
  26. extern void sequencer_init();
  27. extern void sequencer_dump();
  28. extern void sequencer_run_frame(bot *b);
  29. extern sequencer_entry *sequencer_new_entry();
  30. extern void sequencer_move_body(int,int,vector3d *);
  31. extern void sequencer_rotate_body(int,int,vector3d *);
  32. extern void sequencer_rotate_deg_body(int,int,vector3d *);
  33. extern void sequencer_move_leg(int,int,int,vector3d *);
  34. extern void sequencer_rotate_leg(int, int, int, vector3d *);
  35. extern void sequencer_move_leg_parabolic(int,int,int,vector3d *);
  36. extern void sequencer_tripod_walk(int,int,vector3d *, double,double, int);
  37. extern void sequencer_walk(sequencer_walk_parameters *p);
  38. #endif