ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
00001 00007 #include "footbot_turret_entity.h" 00008 #include <argos3/core/simulator/physics_engine/physics_engine.h> 00009 #include <argos3/core/simulator/space/space.h> 00010 00011 namespace argos { 00012 00013 /****************************************/ 00014 /****************************************/ 00015 00016 CFootBotTurretEntity::CFootBotTurretEntity(CComposableEntity* pc_parent) : 00017 CEntity(pc_parent), 00018 m_unMode(MODE_OFF), 00019 m_fRotationSpeed(0.0f) { 00020 Disable(); 00021 SetCanBeEnabledIfDisabled(false); 00022 } 00023 00024 /****************************************/ 00025 /****************************************/ 00026 00027 CFootBotTurretEntity::CFootBotTurretEntity(CComposableEntity* pc_parent, 00028 const std::string& str_id) : 00029 CEntity(pc_parent, str_id), 00030 m_unMode(MODE_OFF), 00031 m_fRotationSpeed(0.0f) { 00032 Disable(); 00033 SetCanBeEnabledIfDisabled(false); 00034 } 00035 00036 /****************************************/ 00037 /****************************************/ 00038 00039 void CFootBotTurretEntity::Reset() { 00040 m_unMode = MODE_OFF; 00041 m_cRotation = CRadians::ZERO; 00042 m_fRotationSpeed = 0.0f; 00043 } 00044 00045 /****************************************/ 00046 /****************************************/ 00047 00048 void CFootBotTurretEntity::SetRotation(const CRadians& c_rotation) { 00049 m_cRotation = c_rotation; 00050 m_cRotation.UnsignedNormalize(); 00051 } 00052 00053 /****************************************/ 00054 /****************************************/ 00055 00056 REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(CFootBotTurretEntity); 00057 00058 /****************************************/ 00059 /****************************************/ 00060 00061 }