DubiousEngine  0.2.0
Simple Game Engine
Dubious::Physics::Arena Class Reference

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
 
Arenaoperator= (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

Dubious::Physics::Arena::Arena ( const Settings settings)

Constructor.

Parameters
settings- [in] settings (see above)
Dubious::Physics::Arena::~Arena ( )
default

Destructor.

Dubious::Physics::Arena::Arena ( const Arena )
delete

Member Function Documentation

const std::map<std::tuple<Physics_object*, Physics_object*>, Contact_manifold>& Dubious::Physics::Arena::manifolds ( ) const
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

Arena& Dubious::Physics::Arena::operator= ( const Arena )
delete
void Dubious::Physics::Arena::push_back ( std::shared_ptr< Physics_object obj)

Add a physics object to the Arena.

Parameters
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

Parameters
elapsed- [in] how much time has elapsed since the last run

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