Manages the physics operations using the specified backend.
More...
#include <physics_system.h>
|
auto | init (rtti::context &ctx) -> bool |
| Initializes the physics system with the given context.
|
|
auto | deinit (rtti::context &ctx) -> bool |
| Deinitializes the physics system with the given context.
|
|
auto | ray_cast (const math::vec3 &origin, const math::vec3 &direction, float max_distance, int layer_mask, bool query_sensors) const -> hpp::optional< raycast_hit > |
|
auto | ray_cast_all (const math::vec3 &origin, const math::vec3 &direction, float max_distance, int layer_mask, bool query_sensors) const -> physics_vector< raycast_hit > |
|
auto | sphere_cast (const math::vec3 &origin, const math::vec3 &direction, float radius, float max_distance, int layer_mask, bool query_sensors) const -> hpp::optional< raycast_hit > |
|
auto | sphere_cast_all (const math::vec3 &origin, const math::vec3 &direction, float radius, float max_distance, int layer_mask, bool query_sensors) const -> physics_vector< raycast_hit > |
|
auto | sphere_overlap (const math::vec3 &origin, float radius, int layer_mask, bool query_sensors) const -> physics_vector< entt::entity > |
|
|
static void | on_create_component (entt::registry &r, entt::entity e) |
| Called when a physics component is created.
|
|
static void | on_destroy_component (entt::registry &r, entt::entity e) |
| Called when a physics component is destroyed.
|
|
static void | apply_explosion_force (physics_component &comp, float explosion_force, const math::vec3 &explosion_position, float explosion_radius, float upwards_modifier, force_mode mode) |
|
static void | apply_force (physics_component &comp, const math::vec3 &force, force_mode mode) |
|
static void | apply_torque (physics_component &comp, const math::vec3 &torque, force_mode mode) |
| Applies a torque to the specified physics component.
|
|
static void | clear_kinematic_velocities (physics_component &comp) |
| Clears kinematic velocities for the specified physics component.
|
|
Manages the physics operations using the specified backend.
Definition at line 14 of file physics_system.h.
◆ backend_type
The backend type used for physics operations.
Definition at line 17 of file physics_system.h.
◆ apply_explosion_force()
void unravel::physics_system::apply_explosion_force |
( |
physics_component & | comp, |
|
|
float | explosion_force, |
|
|
const math::vec3 & | explosion_position, |
|
|
float | explosion_radius, |
|
|
float | upwards_modifier, |
|
|
force_mode | mode ) |
|
static |
◆ apply_force()
◆ apply_torque()
Applies a torque to the specified physics component.
- Parameters
-
comp | The physics component. |
torque | The torque vector. |
Definition at line 124 of file physics_system.cpp.
◆ clear_kinematic_velocities()
Clears kinematic velocities for the specified physics component.
- Parameters
-
comp | The physics component. |
Definition at line 129 of file physics_system.cpp.
◆ deinit()
auto unravel::physics_system::deinit |
( |
rtti::context & | ctx | ) |
-> bool |
Deinitializes the physics system with the given context.
- Parameters
-
ctx | The context to deinitialize. |
- Returns
- True if deinitialization was successful, false otherwise.
Definition at line 44 of file physics_system.cpp.
◆ init()
auto unravel::physics_system::init |
( |
rtti::context & | ctx | ) |
-> bool |
Initializes the physics system with the given context.
- Parameters
-
ctx | The context to initialize with. |
- Returns
- True if initialization was successful, false otherwise.
Definition at line 26 of file physics_system.cpp.
◆ on_create_component()
void unravel::physics_system::on_create_component |
( |
entt::registry & | r, |
|
|
entt::entity | e ) |
|
static |
Called when a physics component is created.
- Parameters
-
r | The registry containing the component. |
e | The entity associated with the component. |
Definition at line 15 of file physics_system.cpp.
◆ on_destroy_component()
void unravel::physics_system::on_destroy_component |
( |
entt::registry & | r, |
|
|
entt::entity | e ) |
|
static |
Called when a physics component is destroyed.
- Parameters
-
r | The registry containing the component. |
e | The entity associated with the component. |
Definition at line 20 of file physics_system.cpp.
◆ ray_cast()
auto unravel::physics_system::ray_cast |
( |
const math::vec3 & | origin, |
|
|
const math::vec3 & | direction, |
|
|
float | max_distance, |
|
|
int | layer_mask, |
|
|
bool | query_sensors ) const -> hpp::optional<raycast_hit> |
◆ ray_cast_all()
auto unravel::physics_system::ray_cast_all |
( |
const math::vec3 & | origin, |
|
|
const math::vec3 & | direction, |
|
|
float | max_distance, |
|
|
int | layer_mask, |
|
|
bool | query_sensors ) const -> physics_vector<raycast_hit> |
◆ sphere_cast()
auto unravel::physics_system::sphere_cast |
( |
const math::vec3 & | origin, |
|
|
const math::vec3 & | direction, |
|
|
float | radius, |
|
|
float | max_distance, |
|
|
int | layer_mask, |
|
|
bool | query_sensors ) const -> hpp::optional<raycast_hit> |
◆ sphere_cast_all()
auto unravel::physics_system::sphere_cast_all |
( |
const math::vec3 & | origin, |
|
|
const math::vec3 & | direction, |
|
|
float | radius, |
|
|
float | max_distance, |
|
|
int | layer_mask, |
|
|
bool | query_sensors ) const -> physics_vector<raycast_hit> |
◆ sphere_overlap()
auto unravel::physics_system::sphere_overlap |
( |
const math::vec3 & | origin, |
|
|
float | radius, |
|
|
int | layer_mask, |
|
|
bool | query_sensors ) const -> physics_vector<entt::entity> |
The documentation for this class was generated from the following files:
- C:/Workspace/github/UnravelEngine/UnravelEngine/engine/engine/physics/ecs/systems/physics_system.h
- C:/Workspace/github/UnravelEngine/UnravelEngine/engine/engine/physics/ecs/systems/physics_system.cpp