ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
#include <physics_model.h>
Public Types | |
typedef std::map< std::string, CPhysicsModel * > | TMap |
typedef std::vector < CPhysicsModel * > | TVector |
Public Member Functions | |
CPhysicsModel (CPhysicsEngine &c_engine, CEmbodiedEntity &c_entity) | |
virtual | ~CPhysicsModel () |
CPhysicsEngine & | GetEngine () |
Returns the physics engine associated to this physics model. | |
CEmbodiedEntity & | GetEmbodiedEntity () |
Returns the embodied entity associated to this physics model. | |
const CEmbodiedEntity & | GetEmbodiedEntity () const |
Returns the embodied entity associated to this physics model. | |
virtual bool | MoveTo (const CVector3 &c_position, const CQuaternion &c_orientation, bool b_check_only=false)=0 |
Moves the entity to the wanted position and orientation. | |
const SBoundingBox & | GetBoundingBox () const |
Returns an axis-aligned box that contains the physics model. | |
virtual void | CalculateBoundingBox ()=0 |
Returns an axis-aligned box that contains the physics model. | |
virtual bool | IsCollidingWithSomething () const =0 |
Returns true if this model is colliding with another model. | |
SBoundingBox & | GetBoundingBox () |
Returns an axis-aligned box that contains the physics model. | |
Protected Attributes | |
CPhysicsEngine & | m_cEngine |
CEmbodiedEntity & | m_cEmbodiedEntity |
SBoundingBox | m_sBoundingBox |
Friends | |
class | CEmbodiedEntity |
Definition at line 38 of file physics_model.h.
typedef std::map<std::string, CPhysicsModel*> argos::CPhysicsModel::TMap |
Reimplemented in argos::CDynamics2DModel.
Definition at line 42 of file physics_model.h.
typedef std::vector<CPhysicsModel*> argos::CPhysicsModel::TVector |
Definition at line 43 of file physics_model.h.
argos::CPhysicsModel::CPhysicsModel | ( | CPhysicsEngine & | c_engine, |
CEmbodiedEntity & | c_entity | ||
) | [inline] |
Definition at line 47 of file physics_model.h.
virtual argos::CPhysicsModel::~CPhysicsModel | ( | ) | [inline, virtual] |
Definition at line 53 of file physics_model.h.
virtual void argos::CPhysicsModel::CalculateBoundingBox | ( | ) | [pure virtual] |
Returns an axis-aligned box that contains the physics model.
The bounding box is often called AABB.
Implemented in argos::CDynamics2DEPuckModel, argos::CDynamics2DFootBotModel, argos::CDynamics2DBoxModel, and argos::CDynamics2DCylinderModel.
const SBoundingBox& argos::CPhysicsModel::GetBoundingBox | ( | ) | const [inline] |
Returns an axis-aligned box that contains the physics model.
The bounding box is often called AABB.
Definition at line 97 of file physics_model.h.
SBoundingBox& argos::CPhysicsModel::GetBoundingBox | ( | ) | [inline] |
Returns an axis-aligned box that contains the physics model.
The bounding box is often called AABB.
Definition at line 118 of file physics_model.h.
CEmbodiedEntity& argos::CPhysicsModel::GetEmbodiedEntity | ( | ) | [inline] |
Returns the embodied entity associated to this physics model.
Definition at line 67 of file physics_model.h.
const CEmbodiedEntity& argos::CPhysicsModel::GetEmbodiedEntity | ( | ) | const [inline] |
Returns the embodied entity associated to this physics model.
Definition at line 75 of file physics_model.h.
CPhysicsEngine& argos::CPhysicsModel::GetEngine | ( | ) | [inline] |
Returns the physics engine associated to this physics model.
Definition at line 59 of file physics_model.h.
virtual bool argos::CPhysicsModel::IsCollidingWithSomething | ( | ) | const [pure virtual] |
Returns true
if this model is colliding with another model.
true
if this model is colliding with another model. Implemented in argos::CDynamics2DEPuckModel, argos::CDynamics2DFootBotModel, argos::CDynamics2DBoxModel, and argos::CDynamics2DCylinderModel.
virtual bool argos::CPhysicsModel::MoveTo | ( | const CVector3 & | c_position, |
const CQuaternion & | c_orientation, | ||
bool | b_check_only = false |
||
) | [pure virtual] |
Moves the entity to the wanted position and orientation.
The movement is allowed only if the object does not collide with anything once in the new position.
c_position | The wanted position. |
c_orientation | The wanted orientation. |
b_check_only | If false , the movement is executed; otherwise, the object is not actually moved. |
true
if no collisions were detected, false
otherwise. Implemented in argos::CDynamics2DModel, argos::CDynamics2DEPuckModel, argos::CDynamics2DFootBotModel, argos::CDynamics2DBoxModel, and argos::CDynamics2DCylinderModel.
friend class CEmbodiedEntity [friend] |
Definition at line 122 of file physics_model.h.
CEmbodiedEntity& argos::CPhysicsModel::m_cEmbodiedEntity [protected] |
Definition at line 127 of file physics_model.h.
CPhysicsEngine& argos::CPhysicsModel::m_cEngine [protected] |
Definition at line 126 of file physics_model.h.
SBoundingBox argos::CPhysicsModel::m_sBoundingBox [protected] |
Definition at line 128 of file physics_model.h.