#include <types.hpp>
|
| void | integrateForcesAndVelocities (float dt) |
| |
| void | checkCollisions () |
| |
| void | processImpulseAndPushback (entt::entity eA, entt::entity eB, const glm::vec2 &normal, float penetration, bool isTriggerA, bool isTriggerB) |
| |
| bool | collideCircleVsCircle (entt::entity e1, const TransformComponent &tc1, const CircleGeometry &geometry1, entt::entity e2, const TransformComponent &tc2, const CircleGeometry &geometry2) |
| |
| bool | collideCircleVsPolygon (entt::entity e1, const TransformComponent &tc1, const CircleGeometry &geometry1, entt::entity e2, const TransformComponent &tc2, const PolygonGeometry &geometry2, bool flipNormal) |
| |
| bool | collidePolygonVsPolygon (entt::entity e1, const TransformComponent &tc1, const PolygonGeometry &geometry1, entt::entity e2, const TransformComponent &tc2, const PolygonGeometry &geometry2) |
| |
|
| glm::vec2 | gravity {0.0f, 0.0f} |
| | global gravity vector applied to dynamic bodies
|
| |
| entt::registry * | registry |
| | pointer to the registry for fetching entities
|
| |
| EventBus * | eventBus |
| | pointer to the system event bus
|
| |
◆ PhysicsSystem()
| phys2d::PhysicsSystem::PhysicsSystem |
( |
entt::registry & |
registry | ) |
|
constructor for PhysicsSystem
- Parameters
-
| registry | reference to the entt registry to manage entities and components |
◆ checkCollisions()
| void phys2d::PhysicsSystem::checkCollisions |
( |
| ) |
|
|
private |
◆ collideCircleVsCircle()
◆ collideCircleVsPolygon()
◆ collidePolygonVsPolygon()
◆ getGravity()
| glm::vec2 phys2d::PhysicsSystem::getGravity |
( |
| ) |
const |
gets the current global gravity vector
- Parameters
-
- Return values
-
◆ integrateForcesAndVelocities()
| void phys2d::PhysicsSystem::integrateForcesAndVelocities |
( |
float |
dt | ) |
|
|
private |
◆ processImpulseAndPushback()
| void phys2d::PhysicsSystem::processImpulseAndPushback |
( |
entt::entity |
eA, |
|
|
entt::entity |
eB, |
|
|
const glm::vec2 & |
normal, |
|
|
float |
penetration, |
|
|
bool |
isTriggerA, |
|
|
bool |
isTriggerB |
|
) |
| |
|
private |
◆ setEventBus()
| void phys2d::PhysicsSystem::setEventBus |
( |
EventBus * |
eventBus | ) |
|
sets the event bus for dispatching physics-related events (e.g., collisions)
- Parameters
-
| eventBus | pointer to the EventBus instance |
- Return values
-
◆ setGravity()
| void phys2d::PhysicsSystem::setGravity |
( |
const glm::vec2 & |
g | ) |
|
sets the global gravity vector for the physics world
- Parameters
-
| g | new two-dimensional gravity vector |
- Return values
-
◆ setRegistry()
| void phys2d::PhysicsSystem::setRegistry |
( |
entt::registry * |
registry | ) |
|
updates the pointer to the entt registry
- Parameters
-
| registry | pointer to the new entt registry |
- Return values
-
◆ update()
| void phys2d::PhysicsSystem::update |
( |
float |
dt | ) |
|
updates the physics simulation for the current frame
- Parameters
-
| dt | delta time since the last frame |
- Return values
-
◆ eventBus
| EventBus* phys2d::PhysicsSystem::eventBus |
|
private |
pointer to the system event bus
◆ gravity
| glm::vec2 phys2d::PhysicsSystem::gravity {0.0f, 0.0f} |
|
private |
global gravity vector applied to dynamic bodies
◆ registry
| entt::registry* phys2d::PhysicsSystem::registry |
|
private |
pointer to the registry for fetching entities
The documentation for this class was generated from the following file:
- /home/runner/work/Cheese-Engine/Cheese-Engine/inc/types.hpp