ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
00001 00008 #ifndef CYLINDER_ENTITY_H 00009 #define CYLINDER_ENTITY_H 00010 00011 namespace argos { 00012 class CCylinderEntity; 00013 class CEmbodiedEntity; 00014 class CLEDEquippedEntity; 00015 } 00016 00017 #include <argos3/core/simulator/entity/embodied_entity.h> 00018 #include <argos3/core/simulator/entity/composable_entity.h> 00019 #include <argos3/plugins/simulator/entities/led_equipped_entity.h> 00020 00021 namespace argos { 00022 00023 class CCylinderEntity : public CComposableEntity { 00024 00025 public: 00026 00027 ENABLE_VTABLE(); 00028 00029 CCylinderEntity(); 00030 00031 CCylinderEntity(const std::string& str_id, 00032 const CVector3& c_position, 00033 const CQuaternion& c_orientation, 00034 bool b_movable, 00035 Real f_radius, 00036 Real f_height, 00037 Real f_mass = 1.0f); 00038 00039 virtual void Init(TConfigurationNode& t_tree); 00040 virtual void Reset(); 00041 00042 inline CEmbodiedEntity& GetEmbodiedEntity() { 00043 return *m_pcEmbodiedEntity; 00044 } 00045 00046 inline CLEDEquippedEntity& GetLEDEquippedEntity() { 00047 return *m_pcLEDEquippedEntity; 00048 } 00049 00050 inline Real GetRadius() const { 00051 return m_fRadius; 00052 } 00053 00054 inline void SetRadius(Real c_radius) { 00055 m_fRadius = c_radius; 00056 } 00057 00058 inline Real GetHeight() const { 00059 return m_fHeight; 00060 } 00061 00062 inline void SetHeight(Real c_height) { 00063 m_fHeight = c_height; 00064 } 00065 00066 inline Real GetMass() const { 00067 return m_fMass; 00068 } 00069 00070 inline void SetMass(Real f_mass) { 00071 m_fMass = f_mass; 00072 } 00073 00074 virtual std::string GetTypeDescription() const { 00075 return "cylinder"; 00076 } 00077 00078 private: 00079 00080 CEmbodiedEntity* m_pcEmbodiedEntity; 00081 CLEDEquippedEntity* m_pcLEDEquippedEntity; 00082 Real m_fRadius; 00083 Real m_fHeight; 00084 Real m_fMass; 00085 CLEDMedium* m_pcLEDMedium; 00086 00087 }; 00088 00089 } 00090 00091 #endif