ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
2 #include <argos3/core/simulator/entity/embodied_entity.h>
3 #include <argos3/core/simulator/entity/composable_entity.h>
11 const std::string& str_id,
20 OffsetPosition(c_offset_position),
21 OffsetOrientation(c_offset_orientation),
23 Orientation(c_orientation),
47 m_cEmbodiedEntity(c_entity),
49 m_vecAnchorMethodHolders(c_entity.GetAnchors().size(), NULL),
50 m_vecThunks(c_entity.GetAnchors().size(), NULL) {}
79 for(
size_t i = 0; i < vecAnchors.size(); ++i) {
80 if(m_vecThunks[vecAnchors[i]->Index] != NULL) {
81 TThunk tThunk = m_vecThunks[vecAnchors[i]->Index];
82 (this->*tThunk)(*vecAnchors[i]);
virtual void CalculateBoundingBox()=0
Calculates the axis-aligned box that contains the entire physics model.
The namespace containing all the ARGoS related code.
Basic class for an entity that contains other entities.
virtual void UpdateEntityStatus()
Updates the status of the associated entity.
void EnableAnchor(const std::string &str_id)
Enables an anchor.
This entity is a link to a body in the physics engine.
CEntity & GetRootEntity()
Returns the root entity containing this entity.
void Enable()
Enables this anchor.
CPhysicsModel(CPhysicsEngine &c_engine, CEmbodiedEntity &c_entity)
void DisableAnchor(const std::string &str_id)
Disables an anchor.
virtual void UpdateComponents()
Calls the Update() method on all the components.
virtual void ScheduleEntityForTransfer(CEmbodiedEntity &c_entity)
Schedules an entity of transfer.
CEmbodiedEntity & Body
The embodied entity that owns this anchor.
std::string Id
The id of the anchor.
unsigned int UInt32
32-bit unsigned integer.
virtual bool IsPointContained(const CVector3 &c_point)
Returns true if the given point is contained in this physics engine.
virtual void CalculateAnchors()
Calculates the anchors associated to this model.
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.
void Disable()
Disables this anchor.
CEmbodiedEntity & GetEmbodiedEntity()
Returns the embodied entity associated to this physics model.
std::vector< SAnchor * > & GetEnabledAnchors()
Returns a vector of enabled anchors for fast looping.