23#ifndef _PHYSICSFACTORY_HH_
24#define _PHYSICSFACTORY_HH_
55 PhysicsFactoryFn _factoryfn);
61 const std::string &_className,
WorldPtr _world);
69 private:
static std::map<std::string, PhysicsFactoryFn> engines;
77 #define GZ_REGISTER_PHYSICS_ENGINE(name, classname) \
78 PhysicsEnginePtr New##classname(WorldPtr _world) \
80 return PhysicsEnginePtr(new gazebo::physics::classname(_world)); \
82 void Register##classname() \
84 PhysicsFactory::RegisterPhysicsEngine(name, New##classname);\
default namespace for gazebo
The physics factory instantiates different physics engines.
Definition PhysicsFactory.hh:46
static PhysicsEnginePtr NewPhysicsEngine(const std::string &_className, WorldPtr _world)
Create a new instance of a physics engine.
static void RegisterPhysicsEngine(std::string _className, PhysicsFactoryFn _factoryfn)
Register a physics class.
static bool IsRegistered(const std::string &_name)
Check if a physics engine is registered.
static void RegisterAll()
Register everything.
PhysicsEnginePtr(* PhysicsFactoryFn)(WorldPtr world)
Definition PhysicsFactory.hh:41
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition PhysicsTypes.hh:125
boost::shared_ptr< World > WorldPtr
Definition PhysicsTypes.hh:89
Forward declarations for the common classes.
Definition Animation.hh:27