prototype_link_entity.h
Go to the documentation of this file.
1 
7 #ifndef PROTOTYPE_LINK_ENTITY_H
8 #define PROTOTYPE_LINK_ENTITY_H
9 
10 namespace argos {
11  class CPrototypeLinkEntity;
12 }
13 
14 #include <argos3/core/utility/math/vector3.h>
15 #include <argos3/core/utility/math/quaternion.h>
16 #include <argos3/core/simulator/entity/embodied_entity.h>
17 #include <unordered_map>
18 
19 namespace argos {
20 
21  class CPrototypeLinkEntity : public CEntity {
22 
23  public:
24 
25  ENABLE_VTABLE();
26 
27  using TVector = std::vector<CPrototypeLinkEntity*>;
28  using TVectorIterator = std::vector<CPrototypeLinkEntity*>::iterator;
29  using TVectorConstIterator = std::vector<CPrototypeLinkEntity*>::const_iterator;
30 
31  public:
32  enum EGeometry {
34  BOX,
36  };
37 
38  public:
39 
41 
42  virtual ~CPrototypeLinkEntity() {}
43 
44  virtual void Init(TConfigurationNode& t_tree);
45 
46  virtual std::string GetTypeDescription() const {
47  return "link";
48  }
49 
51  return m_eGeometry;
52  }
53 
54  const CVector3& GetExtents() const {
55  return m_cExtents;
56  }
57 
58  Real GetMass() const {
59  return m_fMass;
60  }
61 
63  return *m_psAnchor;
64  }
65 
66  const SAnchor& GetAnchor() const {
67  return *m_psAnchor;
68  }
69 
70  private:
71 
72  EGeometry m_eGeometry;
73  CVector3 m_cExtents;
74  Real m_fMass;
75  SAnchor* m_psAnchor;
76  };
77 
78 }
79 
80 #endif
std::vector< CPrototypeLinkEntity * >::const_iterator TVectorConstIterator
std::vector< CEntity * > TVector
A vector of entities.
Definition: entity.h:97
A 3D vector class.
Definition: vector3.h:29
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
const CVector3 & GetExtents() const
The basic entity type.
Definition: entity.h:89
std::vector< CPrototypeLinkEntity * >::iterator TVectorIterator
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
CPrototypeLinkEntity(CComposableEntity *pc_parent)
Basic class for an entity that contains other entities.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
An anchor related to the body of an entity.
Definition: physics_model.h:38
const SAnchor & GetAnchor() const
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12