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