Service responsible for managing the physics world.
More...
#include <physics_service.h>
Service responsible for managing the physics world.
This service encapsulates the physics world and provides functionality to update and interact with the physics simulation.
◆ PhysicsService()
| PhysicsService::PhysicsService |
( |
| ) |
|
◆ debug_mode() [1/2]
| bool PhysicsService::debug_mode |
( |
| ) |
const |
|
noexcept |
◆ debug_mode() [2/2]
| void PhysicsService::debug_mode |
( |
bool |
enabled | ) |
|
|
noexcept |
◆ factory()
Accessor for the physics creation factory instance.
- Returns
- std::unique_ptr<PhysicsCreationFactory>& Reference to the physics creation factory instance.
◆ raycaster()
Accessor for the physics raycaster instance.
- Returns
- std::unique_ptr<PhysicsRaycaster>& Reference to the physics raycaster instance.
◆ update()
| void PhysicsService::update |
( |
float |
dt, |
|
|
const std::vector< std::reference_wrapper< GameObject > > & |
objects |
|
) |
| |
Updates the physics world by stepping the simulation.
- Note
- Delta time (dt) should potentially be fixed for consistent physics behavior.
This method advances the physics simulation by one time step, applying all physics calculations and updating object states.
- Parameters
-
| dt | The (deltatime) time step duration for the physics update. |
| objects | The list of game objects to check for collisions. |
◆ world()
Accessor for the physics world instance.
- Returns
- std::unique_ptr<PhysicsWorld>& Reference to the physics world instance.
The documentation for this class was generated from the following file: