Claire's Game Engine
Full C++ Engine using OpenGL
|
The PhysicManager is a singleton responsible for managing and detecting collisions between ColliderComponent instances. It allows adding/removing components and performs collision detection between them. More...
#include <PhysicManager.h>
Public Member Functions | |
PhysicManager (const PhysicManager &)=delete | |
PhysicManager & | operator= (const PhysicManager &)=delete |
void | AddComponent (ColliderComponent *pComponent) |
Adds a ColliderComponent to the manager for collision detection. | |
void | RemoveComponent (ColliderComponent *pComponent) |
Removes a ColliderComponent from the manager. | |
ColliderComponent * | Collision (ColliderComponent *pComponent) |
Performs collision detection with all other components and returns the first component that collides with the given one. | |
Vector3 | GetCollisionNormal (ColliderComponent *A, ColliderComponent *B) |
Calculates the normal vector at the collision point between two components. | |
Static Public Member Functions | |
static PhysicManager & | Instance () |
Returns the singleton instance of the PhysicManager. | |
The PhysicManager is a singleton responsible for managing and detecting collisions between ColliderComponent instances. It allows adding/removing components and performs collision detection between them.
|
delete |
void PhysicManager::AddComponent | ( | ColliderComponent * | pComponent | ) |
Adds a ColliderComponent to the manager for collision detection.
pComponent | The ColliderComponent to be added. |
ColliderComponent * PhysicManager::Collision | ( | ColliderComponent * | pComponent | ) |
Performs collision detection with all other components and returns the first component that collides with the given one.
pComponent | The ColliderComponent to check collisions for. |
Vector3 PhysicManager::GetCollisionNormal | ( | ColliderComponent * | A, |
ColliderComponent * | B ) |
Calculates the normal vector at the collision point between two components.
A | The first ColliderComponent. |
B | The second ColliderComponent. |
|
static |
Returns the singleton instance of the PhysicManager.
|
delete |
void PhysicManager::RemoveComponent | ( | ColliderComponent * | pComponent | ) |
Removes a ColliderComponent from the manager.
pComponent | The ColliderComponent to be removed. |