c_api_actor.h - Engine C API Reference

c_api_actor.h
  1. #pragma once
  2. #include "c_api_types.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. struct ActorCApi
  7. {
  8. int (*is_collision_enabled) (ActorPtr actor);
  9. int (*is_scene_query_enabled) (ActorPtr actor);
  10. int (*is_gravity_enabled) (ActorPtr actor);
  11. void (*set_collision_enabled) (ActorPtr actor, int enabled);
  12. void (*set_scene_query_enabled) (ActorPtr actor, int enabled);
  13. void (*set_gravity_enabled) (ActorPtr actor, int enabled);
  14. int (*is_static) (ActorPtr actor);
  15. int (*is_dynamic) (ActorPtr actor);
  16. int (*is_physical) (ActorPtr actor);
  17. int (*is_kinematic) (ActorPtr actor);
  18. void (*set_kinematic) (ActorPtr actor, int enabled);
  19. float (*mass) (ActorPtr actor);
  20. float (*linear_damping) (ActorPtr actor);
  21. float (*angular_damping) (ActorPtr actor);
  22. void (*set_linear_damping) (ActorPtr actor, float value);
  23. void (*set_angular_damping) (ActorPtr actor, float value);
  24. CApiVector3 (*center_of_mass) (ActorPtr actor);
  25. CApiVector3 (*position) (ActorPtr actor);
  26. CApiQuaternion (*rotation) (ActorPtr actor);
  27. CApiMatrix4x4 (*pose) (ActorPtr actor);
  28. void (*teleport_position) (ActorPtr actor, ConstVector3Ptr position);
  29. void (*teleport_rotation) (ActorPtr actor, ConstQuaternionPtr rotation);
  30. void (*teleport_pose) (ActorPtr actor, ConstMatrix4x4Ptr pose);
  31. void (*set_velocity) (ActorPtr actor, ConstVector3Ptr velocity);
  32. void (*set_angular_velocity) (ActorPtr actor, ConstVector3Ptr velocity);
  33. CApiVector3 (*velocity) (ActorPtr actor);
  34. CApiVector3 (*angular_velocity) (ActorPtr actor);
  35. CApiVector3 (*point_velocity) (ActorPtr actor, ConstVector3Ptr point);
  36. void (*add_impulse) (ActorPtr actor, ConstVector3Ptr amount);
  37. void (*add_velocity) (ActorPtr actor, ConstVector3Ptr amount);
  38. void (*add_torque_impulse) (ActorPtr actor, ConstVector3Ptr amount);
  39. void (*add_angular_velocity) (ActorPtr actor, ConstVector3Ptr amount);
  40. void (*add_impulse_at) (ActorPtr actor, ConstVector3Ptr impulse, ConstVector3Ptr position);
  41. void (*add_velocity_at) (ActorPtr actor, ConstVector3Ptr velocity, ConstVector3Ptr position);
  42. void (*push) (ActorPtr actor, ConstVector3Ptr velocity, float mass);
  43. void (*push_at) (ActorPtr actor, ConstVector3Ptr velocity, float mass, ConstVector3Ptr position);
  44. int (*is_sleeping) (ActorPtr actor);
  45. void (*wake_up) (ActorPtr actor);
  46. void (*put_to_sleep) (ActorPtr actor);
  47. void (*debug_draw) (ActorPtr actor, LineObjectPtr line_object, ConstVector4Ptr optional_color, ConstMatrix4x4Ptr optional_camera_pose);
  48. UnitRef (*unit) (ActorPtr actor);
  49. unsigned (*node) (ActorPtr actor);
  50. void (*set_collision_filter) (ActorPtr actor, unsigned collision_filter_id32);
  51. unsigned (*initial_shape_template) (ActorPtr actor, unsigned shape_index); // returns IdString32.id of the initial shape template name.
  52. };
  53. #ifdef __cplusplus
  54. }
  55. #endif