argos::CDynamics2DFootBotModel Class Reference

#include <dynamics2d_footbot_model.h>

Inheritance diagram for argos::CDynamics2DFootBotModel:
Collaboration diagram for argos::CDynamics2DFootBotModel:

Public Member Functions

 CDynamics2DFootBotModel (CDynamics2DEngine &c_engine, CFootBotEntity &c_entity)
 
virtual ~CDynamics2DFootBotModel ()
 
virtual void MoveTo (const CVector3 &c_position, const CQuaternion &c_orientation)
 
virtual void Reset ()
 
virtual void CalculateBoundingBox ()
 Calculates the axis-aligned box that contains the entire physics model. More...
 
virtual void UpdateFromEntityStatus ()
 Updates the state of this model from the status of the associated entity. More...
 
void UpdateOriginAnchor (SAnchor &s_anchor)
 
void UpdateTurretAnchor (SAnchor &s_anchor)
 
void UpdatePerspectiveCameraAnchor (SAnchor &s_anchor)
 
cpBody * GetActualBaseBody ()
 
const cpBody * GetActualBaseBody () const
 
cpBody * GetActualGripperBody ()
 
const cpBody * GetActualGripperBody () const
 
- Public Member Functions inherited from argos::CDynamics2DMultiBodyObjectModel
 CDynamics2DMultiBodyObjectModel (CDynamics2DEngine &c_engine, CComposableEntity &c_entity)
 Class constructor. More...
 
virtual ~CDynamics2DMultiBodyObjectModel ()
 Class destructor. More...
 
CComposableEntityGetComposableEntity ()
 Returns the associated composable entity as a non-const reference. More...
 
const CComposableEntityGetComposableEntity () const
 Returns the associated composable entity as a const reference. More...
 
SBodyGetBody (size_t i)
 Returns the i-th body associated to the model. More...
 
const SBodyGetBody (size_t i) const
 Returns the i-th body associated to the model. More...
 
virtual bool IsCollidingWithSomething () const
 Returns true if this model is colliding with another model. More...
 
virtual void AddBody (cpBody *pt_body, const cpVect &t_offset_pos, cpFloat t_offset_orient, Real f_height)
 Adds a body. More...
 
- Public Member Functions inherited from argos::CDynamics2DModel
 CDynamics2DModel (CDynamics2DEngine &c_engine, CEmbodiedEntity &c_entity)
 
virtual ~CDynamics2DModel ()
 
CDynamics2DEngineGetDynamics2DEngine ()
 Returns the dynamics 2D engine state. More...
 
const CDynamics2DEngineGetDynamics2DEngine () const
 Returns the dynamics 2D engine state as a const reference. More...
 
- Public Member Functions inherited from argos::CPhysicsModel
 CPhysicsModel (CPhysicsEngine &c_engine, CEmbodiedEntity &c_entity)
 
virtual ~CPhysicsModel ()
 
CPhysicsEngineGetEngine ()
 Returns the physics engine associated to this physics model. More...
 
CEmbodiedEntityGetEmbodiedEntity ()
 Returns the embodied entity associated to this physics model. More...
 
const CEmbodiedEntityGetEmbodiedEntity () const
 Returns the embodied entity associated to this physics model. More...
 
virtual void UpdateEntityStatus ()
 Updates the status of the associated entity. More...
 
virtual void UpdatePhysics ()
 Performs extra work just before the physics update takes place. More...
 
const SBoundingBoxGetBoundingBox () const
 Returns an axis-aligned box that contains the physics model. More...
 
virtual void CalculateAnchors ()
 Calculates the anchors associated to this model. More...
 
SBoundingBoxGetBoundingBox ()
 Returns an axis-aligned box that contains the physics model. More...
 
template<typename MODEL >
void RegisterAnchorMethod (const SAnchor &s_anchor, void(MODEL::*pt_method)(SAnchor &))
 Registers an anchor method. More...
 

Additional Inherited Members

- Public Types inherited from argos::CDynamics2DModel
typedef std::map< std::string, CDynamics2DModel * > TMap
 
- Public Types inherited from argos::CPhysicsModel
typedef std::map< std::string, CPhysicsModel * > TMap
 
typedef std::vector< CPhysicsModel * > TVector
 

Detailed Description

Definition at line 22 of file dynamics2d_footbot_model.h.

Constructor & Destructor Documentation

◆ CDynamics2DFootBotModel()

argos::CDynamics2DFootBotModel::CDynamics2DFootBotModel ( CDynamics2DEngine c_engine,
CFootBotEntity c_entity 
)

Definition at line 43 of file dynamics2d_footbot_model.cpp.

◆ ~CDynamics2DFootBotModel()

argos::CDynamics2DFootBotModel::~CDynamics2DFootBotModel ( )
virtual

Definition at line 143 of file dynamics2d_footbot_model.cpp.

Member Function Documentation

◆ CalculateBoundingBox()

void argos::CDynamics2DFootBotModel::CalculateBoundingBox ( )
virtual

Calculates the axis-aligned box that contains the entire physics model.

The bounding box is often called AABB.

Reimplemented from argos::CDynamics2DMultiBodyObjectModel.

Definition at line 202 of file dynamics2d_footbot_model.cpp.

◆ GetActualBaseBody() [1/2]

cpBody* argos::CDynamics2DFootBotModel::GetActualBaseBody ( )
inline

Definition at line 45 of file dynamics2d_footbot_model.h.

◆ GetActualBaseBody() [2/2]

const cpBody* argos::CDynamics2DFootBotModel::GetActualBaseBody ( ) const
inline

Definition at line 49 of file dynamics2d_footbot_model.h.

◆ GetActualGripperBody() [1/2]

cpBody* argos::CDynamics2DFootBotModel::GetActualGripperBody ( )
inline

Definition at line 53 of file dynamics2d_footbot_model.h.

◆ GetActualGripperBody() [2/2]

const cpBody* argos::CDynamics2DFootBotModel::GetActualGripperBody ( ) const
inline

Definition at line 57 of file dynamics2d_footbot_model.h.

◆ MoveTo()

void argos::CDynamics2DFootBotModel::MoveTo ( const CVector3 c_position,
const CQuaternion c_orientation 
)
virtual

Moves the entity to the wanted position and orientation within this engine. When you create a new model, you must implement this method. Don't forget to call UpdateEntityStatus() after you've changed the position.

This method should never be called directly from user code. It is called internally by CEmbodiedEntity::MoveTo(), which is meant to be called from user code.

CEmbodiedEntity::MoveTo() never calls this method if the embodied entity is static. This is because static entities cannot be moved around. Thus, there's no need in your code to check whether the associated entity is static.

Parameters
c_positionThe wanted position.
c_orientationThe wanted orientation.

Reimplemented from argos::CDynamics2DMultiBodyObjectModel.

Definition at line 169 of file dynamics2d_footbot_model.cpp.

◆ Reset()

void argos::CDynamics2DFootBotModel::Reset ( )
virtual

Reimplemented from argos::CDynamics2DMultiBodyObjectModel.

Definition at line 182 of file dynamics2d_footbot_model.cpp.

◆ UpdateFromEntityStatus()

void argos::CDynamics2DFootBotModel::UpdateFromEntityStatus ( )
virtual

Updates the state of this model from the status of the associated entity.

This method takes the current state of the associated entity (e.g., desired wheel speed, turret rotationss, etc.) and updates the state of this model. Typically, in this method you apply forces and set speeds.

Implements argos::CDynamics2DMultiBodyObjectModel.

Definition at line 214 of file dynamics2d_footbot_model.cpp.

◆ UpdateOriginAnchor()

void argos::CDynamics2DFootBotModel::UpdateOriginAnchor ( SAnchor s_anchor)

Definition at line 339 of file dynamics2d_footbot_model.cpp.

◆ UpdatePerspectiveCameraAnchor()

void argos::CDynamics2DFootBotModel::UpdatePerspectiveCameraAnchor ( SAnchor s_anchor)

Definition at line 362 of file dynamics2d_footbot_model.cpp.

◆ UpdateTurretAnchor()

void argos::CDynamics2DFootBotModel::UpdateTurretAnchor ( SAnchor s_anchor)

Definition at line 348 of file dynamics2d_footbot_model.cpp.