Fired when two solid physical bodies collide.
More...
#include <Events.hpp>
|
| | CollideEvent ()=default |
| | Default constructor for line-by-line initialization.
|
| |
| | CollideEvent (entt::entity a, entt::entity b, glm::vec2 normal, float f) |
| | Initializes a collision event with specific physics data.
|
| |
| virtual | ~Event ()=default |
| | Virtual destructor to ensure proper polymorphic cleanup.
|
| |
|
| entt::entity | entityA |
| | ID of the entity that initiated the contact.
|
| |
| entt::entity | entityB |
| | ID of the entity that was hit.
|
| |
| glm::vec2 | normal |
| | Collision normal vector (direction of the impact)
|
| |
| float | force |
| | Magnitude of the collision impulse.
|
| |
Fired when two solid physical bodies collide.
◆ CollideEvent() [1/2]
| CollideEvent::CollideEvent |
( |
| ) |
|
|
default |
Default constructor for line-by-line initialization.
- Parameters
-
- Return values
-
◆ CollideEvent() [2/2]
| CollideEvent::CollideEvent |
( |
entt::entity |
a, |
|
|
entt::entity |
b, |
|
|
glm::vec2 |
normal, |
|
|
float |
f |
|
) |
| |
|
inline |
Initializes a collision event with specific physics data.
- Parameters
-
| a | : ID of the first entity |
| b | : ID of the second entity |
| nx | : X component of the collision normal vector |
| ny | : Y component of the collision normal vector |
| f | : Force of the impact |
- Return values
-
◆ entityA
| entt::entity CollideEvent::entityA |
ID of the entity that initiated the contact.
◆ entityB
| entt::entity CollideEvent::entityB |
ID of the entity that was hit.
◆ force
| float CollideEvent::force |
Magnitude of the collision impulse.
◆ normal
| glm::vec2 CollideEvent::normal |
Collision normal vector (direction of the impact)
The documentation for this struct was generated from the following file:
- /home/runner/work/Cheese-Engine/Cheese-Engine/inc/Events.hpp