CG-Project2
Loading...
Searching...
No Matches
CollisionSolver Class Reference

Solves all collision between entities in the given PhysicWorld. More...

#include <PhysicWorld.hpp>

Inheritance diagram for CollisionSolver:
Collaboration diagram for CollisionSolver:

Public Member Functions

virtual void solve () override
 It gets all collisions at the current step, and calls a different method based on the collider type of the entities. To call the right method it uses the ColliderType as index of a matrix containing all tests method pointers.
 CollisionSolver (PhysicWorld &world)
 Instance basic CollisionSolver object.
Public Member Functions inherited from Solver
 Solver (PhysicWorld &world)
 Instances basic Solver.

Additional Inherited Members

Public Attributes inherited from Solver
PhysicWorldworld
 the reference to the PhysicWorld

Detailed Description

Solves all collision between entities in the given PhysicWorld.

Constructor & Destructor Documentation

◆ CollisionSolver()

CollisionSolver::CollisionSolver ( PhysicWorld & world)
inline

Instance basic CollisionSolver object.

Parameters
worldthe physic world to be attached
See also
Solver

Member Function Documentation

◆ solve()

void CollisionSolver::solve ( )
overridevirtual

It gets all collisions at the current step, and calls a different method based on the collider type of the entities. To call the right method it uses the ColliderType as index of a matrix containing all tests method pointers.

After testing the collisions, if the entities are colliding it applies the right modification to his position/physic values.

Reimplemented from Solver.


The documentation for this class was generated from the following files: