Warning: include(php/utility.php): Failed to open stream: No such file or directory in /home/argos/argos3/doc/api/embedded/a00745_source.php on line 2

Warning: include(): Failed opening 'php/utility.php' for inclusion (include_path='.:/usr/lib64/php') in /home/argos/argos3/doc/api/embedded/a00745_source.php on line 2
The ARGoS Website

cylinder_entity.h
Go to the documentation of this file.
1 
8 #ifndef CYLINDER_ENTITY_H
9 #define CYLINDER_ENTITY_H
10 
11 namespace argos {
12  class CCylinderEntity;
13  class CEmbodiedEntity;
14  class CLEDEquippedEntity;
15 }
16 
17 #include <argos3/core/simulator/entity/embodied_entity.h>
18 #include <argos3/core/simulator/entity/composable_entity.h>
19 #include <argos3/plugins/simulator/entities/led_equipped_entity.h>
20 
21 namespace argos {
22 
24 
25  public:
26 
27  ENABLE_VTABLE();
28 
30 
31  CCylinderEntity(const std::string& str_id,
32  const CVector3& c_position,
33  const CQuaternion& c_orientation,
34  bool b_movable,
35  Real f_radius,
36  Real f_height,
37  Real f_mass = 1.0f);
38 
39  virtual void Init(TConfigurationNode& t_tree);
40  virtual void Reset();
41 
42  /*
43  * Enables the LEDs for this entity.
44  * Adds the LED equipped entity to the given medium.
45  * If you don't call this method, the LEDs added with
46  * CCylinderEntity::AddLED() won't be updated correctly.
47  * @param c_medium The medium to which the LEDs must be associated.
48  * @see CCylinderEntity::AddLED()
49  */
50  void EnableLEDs(CLEDMedium& c_medium);
51 
52  /*
53  * Disables the LEDs for this entity.
54  */
55  void DisableLEDs();
56 
65  void AddLED(const CVector3& c_offset,
66  const CColor& c_color = CColor::BLACK);
67 
69  return *m_pcEmbodiedEntity;
70  }
71 
73  return *m_pcLEDEquippedEntity;
74  }
75 
76  inline Real GetRadius() const {
77  return m_fRadius;
78  }
79 
80  inline void SetRadius(Real c_radius) {
81  m_fRadius = c_radius;
82  }
83 
84  inline Real GetHeight() const {
85  return m_fHeight;
86  }
87 
88  inline void SetHeight(Real c_height) {
89  m_fHeight = c_height;
90  }
91 
92  inline Real GetMass() const {
93  return m_fMass;
94  }
95 
96  inline void SetMass(Real f_mass) {
97  m_fMass = f_mass;
98  }
99 
100  virtual std::string GetTypeDescription() const {
101  return "cylinder";
102  }
103 
104  private:
105 
106  CEmbodiedEntity* m_pcEmbodiedEntity;
107  CLEDEquippedEntity* m_pcLEDEquippedEntity;
108  Real m_fRadius;
109  Real m_fHeight;
110  Real m_fMass;
111  CLEDMedium* m_pcLEDMedium;
112 
113  };
114 
115 }
116 
117 #endif
A 3D vector class.
Definition: vector3.h:29
static CColor BLACK
Definition: color.h:29
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
void SetMass(Real f_mass)
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
This entity is a link to a body in the physics engine.
void SetHeight(Real c_height)
A container of CLEDEntity.
Basic class for an entity that contains other entities.
CLEDEquippedEntity & GetLEDEquippedEntity()
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
void EnableLEDs(CLEDMedium &c_medium)
The basic color type.
Definition: color.h:25
CEmbodiedEntity & GetEmbodiedEntity()
void SetRadius(Real c_radius)
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
void AddLED(const CVector3 &c_offset, const CColor &c_color=CColor::BLACK)
Adds an LED to this entity.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...