PhysicsFactory Class Reference

The physics factory instantiates different physics engines. More...

#include <physics/physics.hh>

Static Public Member Functions

static bool IsRegistered (const std::string &_name)
 Check if a physics engine is registered. More...
 
static PhysicsEnginePtr NewPhysicsEngine (const std::string &_className, WorldPtr _world)
 Create a new instance of a physics engine. More...
 
static void RegisterAll ()
 Register everything. More...
 
static void RegisterPhysicsEngine (std::string _className, PhysicsFactoryFn _factoryfn)
 Register a physics class. More...
 

Detailed Description

The physics factory instantiates different physics engines.

Member Function Documentation

static bool IsRegistered ( const std::string &  _name)
static

Check if a physics engine is registered.

Parameters
[in]_nameName of the physics engine.
Returns
True if physics engine is registered, false otherwise.
static PhysicsEnginePtr NewPhysicsEngine ( const std::string &  _className,
WorldPtr  _world 
)
static

Create a new instance of a physics engine.

Parameters
[in]_classNameName of the physics class.
[in]_worldWorld to pass to the created physics engine.
static void RegisterAll ( )
static

Register everything.

static void RegisterPhysicsEngine ( std::string  _className,
PhysicsFactoryFn  _factoryfn 
)
static

Register a physics class.

Parameters
[in]_classNameName of the physics class.
[in]_factoryfnFunction pointer used to create a physics engine.

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