Class atlas::physics::physics_api
ClassList > atlas > physics > physics_api
Inherited by the following classes: atlas::physics::jolt_api
Public Functions
Type | Name |
---|---|
void | add_angular_velocity_by_body (const glm::vec3 & p_angular_velocity, const physics_body & p_body) |
void | add_force_by_body (const glm::vec3 & p_force, const physics_body & p_body) Calls the corresponding virtuals. |
void | add_linear_velocity_by_body (const glm::vec3 & p_velocity, const physics_body & p_body) FIXME: This one is really complicated because it needs to try over multiple frames. And locks are requried. So will be implemented later. |
void | set_angular_velocity_by_body (const glm::vec3 & p_angular_velocity, const physics_body & p_body) |
void | set_linear_velocity_by_body (const glm::vec3 & p_velocity, const physics_body & p_body) |
void | update_atlas_values () Allows for jolt values to sync with flecs. |
void | update_jolt_values () Allows for flecs values to sync with jolt without running into collisions. |
virtual | ~physics_api () = default |
Public Functions Documentation
function add_angular_velocity_by_body
void atlas::physics::physics_api::add_angular_velocity_by_body (
const glm::vec3 & p_angular_velocity,
const physics_body & p_body
)
function add_force_by_body
Calls the corresponding virtuals.
void atlas::physics::physics_api::add_force_by_body (
const glm::vec3 & p_force,
const physics_body & p_body
)
function add_linear_velocity_by_body
FIXME: This one is really complicated because it needs to try over multiple frames. And locks are requried. So will be implemented later.
void atlas::physics::physics_api::add_linear_velocity_by_body (
const glm::vec3 & p_velocity,
const physics_body & p_body
)
function set_angular_velocity_by_body
void atlas::physics::physics_api::set_angular_velocity_by_body (
const glm::vec3 & p_angular_velocity,
const physics_body & p_body
)
function set_linear_velocity_by_body
void atlas::physics::physics_api::set_linear_velocity_by_body (
const glm::vec3 & p_velocity,
const physics_body & p_body
)
function update_atlas_values
Allows for jolt values to sync with flecs.
void atlas::physics::physics_api::update_atlas_values ()
Note:
should be called either by user to sync events or just after physics_update()
function update_jolt_values
Allows for flecs values to sync with jolt without running into collisions.
void atlas::physics::physics_api::update_jolt_values ()
Note:
Takes all transforms, rigidbodies, and collider bodies that changed and updates jolt.
Note:
should be called either by the user to sync events or just before physics_update()
function ~physics_api
virtual atlas::physics::physics_api::~physics_api () = default
The documentation for this class was generated from the following file TheAtlasEngine/atlas/physics/physics_3d/physics_api.hpp