rotor_equipped_entity.h
Go to the documentation of this file.
1 
7 #ifndef ROTOR_EQUIPPED_ENTITY_H
8 #define ROTOR_EQUIPPED_ENTITY_H
9 
10 #include <argos3/core/simulator/entity/entity.h>
11 #include <argos3/core/utility/math/vector3.h>
12 
13 namespace argos {
14 
15  class CRotorEquippedEntity : public CEntity {
16 
17  public:
18 
20 
21  public:
22 
24  size_t un_num_rotors);
25 
27  const std::string& str_id,
28  size_t un_num_rotors);
29 
30  virtual ~CRotorEquippedEntity();
31 
32  virtual void Reset();
33 
34  inline size_t GetNumRotors() const {
35  return m_unNumRotors;
36  }
37 
38  void SetRotor(UInt32 un_index,
39  const CVector3& c_position);
40 
41  const CVector3& GetRotorPosition(size_t un_index) const;
42 
43  inline const CVector3* GetRotorPositions() const {
44  return m_pcRotorPositions;
45  }
46 
47  Real GetRotorVelocity(size_t un_index) const;
48 
49  inline const Real* GetRotorVelocities() const {
50  return m_pfRotorVelocities;
51  }
52 
53  void SetVelocities(Real* pf_velocities);
54 
55  virtual std::string GetTypeDescription() const {
56  return "rotors";
57  }
58 
59  private:
60 
61  size_t m_unNumRotors;
62  CVector3* m_pcRotorPositions;
63  Real* m_pfRotorVelocities;
64 
65  };
66 
67 }
68 
69 #endif
unsigned int UInt32
32-bit unsigned integer.
Definition: datatypes.h:97
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
Basic class for an entity that contains other entities.
The basic entity type.
Definition: entity.h:90
A 3D vector class.
Definition: vector3.h:31
const CVector3 * GetRotorPositions() const
void SetRotor(UInt32 un_index, const CVector3 &c_position)
Real GetRotorVelocity(size_t un_index) const
CRotorEquippedEntity(CComposableEntity *pc_parent, size_t un_num_rotors)
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
const CVector3 & GetRotorPosition(size_t un_index) const
virtual std::string GetTypeDescription() const
Returns a string label for this class.
const Real * GetRotorVelocities() const
void SetVelocities(Real *pf_velocities)