2#include <argos3/core/simulator/entity/embodied_entity.h>
3#include <argos3/core/simulator/entity/composable_entity.h>
11 const std::string& str_id,
47 m_cEmbodiedEntity(c_entity),
49 m_vecAnchorMethodHolders(c_entity.GetAnchors().size(), nullptr),
50 m_vecThunks(c_entity.GetAnchors().size(), nullptr) {}
71 m_cEngine.ScheduleEntityForTransfer(m_cEmbodiedEntity);
78 std::vector<SAnchor*>& vecAnchors = m_cEmbodiedEntity.GetEnabledAnchors();
79 for(
size_t i = 0; i < vecAnchors.size(); ++i) {
80 if(m_vecThunks[vecAnchors[i]->Index] !=
nullptr) {
81 TThunk tThunk = m_vecThunks[vecAnchors[i]->Index];
82 (this->*tThunk)(*vecAnchors[i]);
unsigned int UInt32
32-bit unsigned integer.
The namespace containing all the ARGoS related code.
Basic class for an entity that contains other entities.
virtual void UpdateComponents()
Calls the Update() method on all the components.
This entity is a link to a body in the physics engine.
CEmbodiedEntity & Body
The embodied entity that owns this anchor.
CQuaternion Orientation
The orientation of the anchor wrt the global coordinate system.
CQuaternion OffsetOrientation
The initial orientation of the anchor wrt the body coordinate system.
std::string Id
The id of the anchor.
void Disable()
Disables this anchor.
SAnchor(CEmbodiedEntity &c_body, const std::string &str_id, UInt32 un_index, const CVector3 &c_offset_position, const CQuaternion &c_offset_orientation, const CVector3 &c_position, const CQuaternion &c_orientation)
Struct constructor.
UInt32 Index
The index of the anchor assigned by the embodied entity.
CVector3 Position
The position of the anchor wrt the global coordinate system.
void Enable()
Enables this anchor.
UInt32 InUseCount
A counter for the devices using this anchor.
CVector3 OffsetPosition
The initial position of the anchor wrt the body coordinate system.
CEmbodiedEntity & GetEmbodiedEntity()
Returns the embodied entity associated to this physics model.
virtual void CalculateAnchors()
Calculates the anchors associated to this model.
CPhysicsModel(CPhysicsEngine &c_engine, CEmbodiedEntity &c_entity)
virtual void CalculateBoundingBox()=0
Calculates the axis-aligned box that contains the entire physics model.
virtual void UpdateEntityStatus()
Updates the status of the associated entity.