The Physics class handles the physics simulation, including collision detection and resolution.
More...
#include <Physics.h>
The Physics class handles the physics simulation, including collision detection and resolution.
◆ AddCollider()
Adds a collider to the simulation.
- Parameters
-
pCollider | The collider to add. |
◆ AddRigidbody()
void Physics::AddRigidbody |
( |
RigidBody * | pRigidbody | ) |
|
Adds a rigid body to the simulation.
- Parameters
-
pRigidbody | The rigid body to add. |
◆ LineTrace()
bool Physics::LineTrace |
( |
Vector3 | start, |
|
|
Vector3 | direction, |
|
|
float | maxDistance, |
|
|
raycastHit & | hit, |
|
|
bool | debugPersistant = false, |
|
|
Actor * | self = nullptr ) |
Performs a line trace (raycast) in the physics world.
- Parameters
-
start | The starting point of the trace. |
direction | The direction of the trace. |
maxDistance | The maximum distance to trace. |
hit | The result of the trace if a hit occurs. |
debugPersistant | Whether to persist debug visualization. |
self | The actor to ignore during the trace. |
- Returns
- True if the trace hit something, false otherwise.
◆ RemoveCollider()
Removes a collider from the simulation.
- Parameters
-
pCollider | The collider to remove. |
◆ RemoveRigidBody()
void Physics::RemoveRigidBody |
( |
RigidBody * | pRigidbody | ) |
|
Removes a rigid body from the simulation.
- Parameters
-
pRigidbody | The rigid body to remove. |
◆ SubscribeTo()
Subscribes a listener to collision events for a specific collider.
- Parameters
-
pCollider | The collider to subscribe to. |
pListener | The listener to notify of collision events. |
The documentation for this class was generated from the following files:
- D:/DEV JEUX/2025/CPP/Opengl/ClutterEngineOpenGL/ClutterEngine/Engine/Physics/Physics.h
- D:/DEV JEUX/2025/CPP/Opengl/ClutterEngineOpenGL/ClutterEngine/Engine/Physics/Physics.cpp