21 #ifndef _PHYSICSENGINE_HH_
22 #define _PHYSICSENGINE_HH_
24 #include <boost/thread/recursive_mutex.hpp>
55 public:
virtual void Load(sdf::ElementPtr _sdf);
58 public:
virtual void Init() = 0;
61 public:
virtual void Fini();
67 public:
virtual void InitForThread() = 0;
70 public:
virtual void UpdateCollision() = 0;
74 public:
virtual std::string GetType()
const = 0;
78 public:
virtual void SetSeed(uint32_t _seed) = 0;
82 public:
double GetUpdatePeriod();
86 public:
double GetTargetRealTimeFactor()
const;
90 public:
double GetRealTimeUpdateRate()
const;
94 public:
double GetMaxStepSize()
const;
98 public:
void SetTargetRealTimeFactor(
double _factor);
102 public:
void SetRealTimeUpdateRate(
double _rate);
106 public:
void SetMaxStepSize(
double _stepSize);
123 const std::string &_shapeType,
LinkPtr _link) = 0;
128 public:
CollisionPtr CreateCollision(
const std::string &_shapeType,
129 const std::string &_linkName);
134 public:
virtual ShapePtr CreateShape(
const std::string &_shapeType,
140 public:
virtual JointPtr CreateJoint(
const std::string &_type,
149 public:
virtual void SetGravity(
156 public:
virtual void SetWorldCFM(
double _cfm);
162 public:
virtual void SetWorldERP(
double _erp);
168 public:
virtual void SetAutoDisableFlag(
bool _autoDisable);
174 public:
virtual void SetSORPGSPreconIters(
unsigned int _iters)
181 public:
virtual void SetSORPGSIters(
unsigned int _iters)
194 public:
virtual void SetContactMaxCorrectingVel(
double _vel);
200 public:
virtual void SetContactSurfaceLayer(
double _layerDepth);
206 public:
virtual void SetMaxContacts(
unsigned int _maxContacts);
297 public:
virtual bool SetParam(
const std::string &_key,
298 const boost::any &_value);
304 public:
virtual boost::any GetParam(
const std::string &_key)
const;
307 public:
virtual void DebugPrint()
const = 0;
316 {
return this->physicsUpdateMutex;}
320 protected:
virtual void OnRequest(ConstRequestPtr &_msg);
324 protected:
virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg);
330 protected: sdf::ElementPtr
sdf;