#include <physics-system.hpp>
Definition at line 38 of file physics-system.hpp.
◆ physics_system()
◆ interpolate()
void physics_system::interpolate |
( |
float |
alpha | ) |
|
◆ set_gravity()
void physics_system::set_gravity |
( |
const math::fvec3 & |
gravity | ) |
|
|
inlinenoexcept |
◆ trace()
std::optional< std::tuple< entity::id, float, std::uint32_t, math::fvec3 > > physics_system::trace |
( |
const geom::ray< float, 3 > & |
ray, |
|
|
entity::id |
ignore_eid = entt::null , |
|
|
std::uint32_t |
layer_mask = ~std::uint32_t{0} |
|
) |
| const |
Traces a ray to the nearest point of intersection.
- Parameters
-
ray | World-spce ray. |
ignore_eid | Entity ID with which to ignore intersection. |
layer_mask | Mask of collision layers with which the ray can intersect. |
- Returns
- Tuple containing the ID of the nearest intersecting entity, distance along the ray to the point of intersection, index of the hit face, and surface normal at the point of intersection; or std::nullopt if no intersection occurred.
Definition at line 112 of file physics-system.cpp.
◆ update()
void physics_system::update |
( |
float |
t, |
|
|
float |
dt |
|
) |
| |
|
overridevirtual |
The documentation for this class was generated from the following files: