argos::CDynamics2DModel Class Referenceabstract

The base class for models in the dynamics 2D engine. More...

#include <dynamics2d_model.h>

Inheritance diagram for argos::CDynamics2DModel:
Collaboration diagram for argos::CDynamics2DModel:

Public Types

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
 

Public Member Functions

 CDynamics2DModel (CDynamics2DEngine &c_engine, CEmbodiedEntity &c_entity)
 
virtual ~CDynamics2DModel ()
 
virtual void Reset ()=0
 
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 UpdateFromEntityStatus ()=0
 Updates the state of this model from the status of the associated entity. More...
 
virtual void UpdatePhysics ()
 Performs extra work just before the physics update takes place. More...
 
virtual void MoveTo (const CVector3 &c_position, const CQuaternion &c_orientation)=0
 
const SBoundingBoxGetBoundingBox () const
 Returns an axis-aligned box that contains the physics model. More...
 
virtual void CalculateBoundingBox ()=0
 Calculates the axis-aligned box that contains the entire physics model. More...
 
virtual void CalculateAnchors ()
 Calculates the anchors associated to this model. More...
 
virtual bool IsCollidingWithSomething () const =0
 Returns true if this model is colliding with another 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...
 

Detailed Description

The base class for models in the dynamics 2D engine.

All the models in the dynamics 2D engine inherit from this class, which provides the additional method GetDynamics2DEngine() over the CPhysicsModel interface.

See also
CPhysicsModel
CDynamics2DEngine

Definition at line 27 of file dynamics2d_model.h.

Member Typedef Documentation

◆ TMap

typedef std::map<std::string, CDynamics2DModel*> argos::CDynamics2DModel::TMap

Definition at line 31 of file dynamics2d_model.h.

Constructor & Destructor Documentation

◆ CDynamics2DModel()

argos::CDynamics2DModel::CDynamics2DModel ( CDynamics2DEngine c_engine,
CEmbodiedEntity c_entity 
)
inline

Definition at line 35 of file dynamics2d_model.h.

◆ ~CDynamics2DModel()

virtual argos::CDynamics2DModel::~CDynamics2DModel ( )
inlinevirtual

Definition at line 40 of file dynamics2d_model.h.

Member Function Documentation

◆ GetDynamics2DEngine() [1/2]

CDynamics2DEngine& argos::CDynamics2DModel::GetDynamics2DEngine ( )
inline

Returns the dynamics 2D engine state.

Returns
The dynamics 2D engine state.

Definition at line 48 of file dynamics2d_model.h.

◆ GetDynamics2DEngine() [2/2]

const CDynamics2DEngine& argos::CDynamics2DModel::GetDynamics2DEngine ( ) const
inline

Returns the dynamics 2D engine state as a const reference.

Returns
The dynamics 2D engine state as a const reference.

Definition at line 56 of file dynamics2d_model.h.

◆ Reset()