DubiousEngine
0.2.0
Simple Game Engine
|
Container for all of the Physics things. More...
#include <Arena.h>
Classes | |
struct | Collision_solver_settings |
Collision solver settings. More... | |
struct | Constraint_solver_settings |
Constraint solver settings. More... | |
struct | Settings |
Physics settings. More... | |
Public Member Functions | |
Arena (const Settings &settings) | |
Constructor. More... | |
~Arena ()=default | |
Destructor. More... | |
Arena (const Arena &)=delete | |
Arena & | operator= (const Arena &)=delete |
void | run_physics (float elapsed) |
Run the main physics loop. More... | |
void | push_back (std::shared_ptr< Physics_object > obj) |
Add a physics object to the Arena. More... | |
const std::map< std::tuple< Physics_object *, Physics_object * >, Contact_manifold > & | manifolds () const |
Manifold accessor. More... | |
Container for all of the Physics things.
Much as the Scene describes everything that exists in the Renderer, the Arena describes everything in the Physics world. This is the container for all of the physical things that are going to be forced, collided, moved, etc. A game will have one of these.
Dubious::Physics::Arena::Arena | ( | const Settings & | settings | ) |
Constructor.
settings | - [in] settings (see above) |
|
default |
Destructor.
|
delete |
|
inline |
Manifold accessor.
Not sure if this is useful in any situation EXCEPT the one in which I'm trying to debug by drawing the contacts
void Dubious::Physics::Arena::push_back | ( | std::shared_ptr< Physics_object > | obj | ) |
Add a physics object to the Arena.
obj | - [in] the object to add |
void Dubious::Physics::Arena::run_physics | ( | float | elapsed | ) |
Run the main physics loop.
This is the entry point to all of the physics. This will apply forces, move, collide, resolve, and blow up
elapsed | - [in] how much time has elapsed since the last run |