ARGoS  3
A parallel, multi-engine simulator for swarm robotics
pointmass3d_model.h
Go to the documentation of this file.
1 
7 #ifndef POINTMASS3D_MODEL_H
8 #define POINTMASS3D_MODEL_H
9 
10 namespace argos {
11  class CPointMass3DEngine;
12 }
13 
14 #include <argos3/core/simulator/physics_engine/physics_model.h>
15 #include <argos3/plugins/simulator/physics_engines/pointmass3d/pointmass3d_engine.h>
16 #include <argos3/core/utility/math/vector3.h>
17 #include <argos3/core/utility/math/quaternion.h>
18 
19 namespace argos {
20 
22 
23  public:
24 
25  typedef std::map<std::string, CPointMass3DModel*> TMap;
26 
27  public:
28 
30  CEmbodiedEntity& c_entity);
31 
32  virtual ~CPointMass3DModel() {}
33 
34  virtual void MoveTo(const CVector3& c_position,
35  const CQuaternion& c_orientation);
36 
37  virtual void Reset();
38 
39  virtual void Step() = 0;
40  virtual void UpdateFromEntityStatus() = 0;
41 
42  virtual bool IsCollidingWithSomething() const;
43 
44  virtual bool CheckIntersectionWithRay(Real& f_t_on_ray,
45  const CRay3& c_ray) const = 0;
46 
50  virtual void UpdateOriginAnchor(SAnchor& s_anchor);
51 
57  return m_cPM3DEngine;
58  }
59 
65  return m_cPM3DEngine;
66  }
67 
68  protected:
69 
72 
75 
78 
81 
82  };
83 
84 }
85 
86 #endif
argos::CPointMass3DModel::Reset
virtual void Reset()
Definition: pointmass3d_model.cpp:23
argos::CPointMass3DModel::IsCollidingWithSomething
virtual bool IsCollidingWithSomething() const
Returns true if this model is colliding with another model.
Definition: pointmass3d_model.cpp:42
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CVector3
A 3D vector class.
Definition: vector3.h:29
argos::CRay3
Definition: ray3.h:19
argos::CPointMass3DModel::~CPointMass3DModel
virtual ~CPointMass3DModel()
Definition: pointmass3d_model.h:32
argos::CEmbodiedEntity
This entity is a link to a body in the physics engine.
Definition: embodied_entity.h:48
argos::CPointMass3DModel::GetPM3DEngine
const CPointMass3DEngine & GetPM3DEngine() const
Returns a const reference to the physics engine controlling this model.
Definition: pointmass3d_model.h:64
argos::CPointMass3DModel::CheckIntersectionWithRay
virtual bool CheckIntersectionWithRay(Real &f_t_on_ray, const CRay3 &c_ray) const =0
argos::CPhysicsModel
Definition: physics_model.h:102
argos::CPointMass3DModel
Definition: pointmass3d_model.h:21
argos::CPointMass3DModel::TMap
std::map< std::string, CPointMass3DModel * > TMap
Definition: pointmass3d_model.h:25
argos::CQuaternion
Definition: quaternion.h:14
argos::SAnchor
An anchor related to the body of an entity.
Definition: physics_model.h:38
argos::CPointMass3DModel::UpdateFromEntityStatus
virtual void UpdateFromEntityStatus()=0
Updates the state of this model from the status of the associated entity.
argos::CPointMass3DModel::MoveTo
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
Definition: pointmass3d_model.cpp:33
argos::CPointMass3DModel::m_cAcceleration
CVector3 m_cAcceleration
The acceleration of this model in the engine.
Definition: pointmass3d_model.h:80
argos::CPointMass3DModel::m_cPM3DEngine
CPointMass3DEngine & m_cPM3DEngine
Reference to the physics engine.
Definition: pointmass3d_model.h:71
argos::CPointMass3DModel::m_cVelocity
CVector3 m_cVelocity
The linear velocity of this model in the engine.
Definition: pointmass3d_model.h:77
argos::CPointMass3DModel::Step
virtual void Step()=0
argos::CPointMass3DModel::m_cPosition
CVector3 m_cPosition
The position of the model in this engine.
Definition: pointmass3d_model.h:74
argos::CPointMass3DEngine
Definition: pointmass3d_engine.h:22
argos::CPointMass3DModel::UpdateOriginAnchor
virtual void UpdateOriginAnchor(SAnchor &s_anchor)
Updates the origin anchor associated to the embodied entity.
Definition: pointmass3d_model.cpp:56
argos::CPointMass3DModel::CPointMass3DModel
CPointMass3DModel(CPointMass3DEngine &c_engine, CEmbodiedEntity &c_entity)
Definition: pointmass3d_model.cpp:9
Real
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
argos::CPointMass3DModel::GetPM3DEngine
CPointMass3DEngine & GetPM3DEngine()
Returns a reference to the physics engine controlling this model.
Definition: pointmass3d_model.h:56