asim.h 733 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <iron_array.h>
  3. #include <iron_vec4.h>
  4. #include <iron_quat.h>
  5. typedef struct physics_pair {
  6. float pos_a_x;
  7. float pos_a_y;
  8. float pos_a_z;
  9. } physics_pair_t;
  10. void asim_world_create();
  11. void asim_world_destroy();
  12. void asim_world_update();
  13. physics_pair_t *asim_world_get_contact();
  14. void *asim_body_create(int shape, float mass, float dimx, float dimy, float dimz, float x, float y, float z, void *posa, void *inda, float scale_pos);
  15. void asim_body_apply_impulse(void *body, float x, float y, float z);
  16. void asim_body_get_pos(void *body, vec4_t *pos);
  17. void asim_body_get_rot(void *body, quat_t *rot);
  18. void asim_body_sync_transform(void *body, vec4_t pos, quat_t rot);
  19. void asim_body_remove(void *body);