omnidirectional_camera_equipped_entity.cpp
Go to the documentation of this file.
2 #include <argos3/core/simulator/space/space.h>
3 
4 namespace argos {
5 
6  /****************************************/
7  /****************************************/
8 
10  CEntity(pc_parent) {
11  Disable();
12  }
13 
14  /****************************************/
15  /****************************************/
16 
18  const std::string& str_id,
19  const CRadians& c_aperture,
20  const CVector3& c_offset) :
21  CEntity(pc_parent, str_id),
22  m_cAperture(c_aperture),
23  m_cOffset(c_offset) {
24  Disable();
25  }
26 
27  /****************************************/
28  /****************************************/
29 
31  try {
32  CEntity::Init(t_tree);
33  GetNodeAttribute(t_tree, "aperture", m_cAperture);
34  GetNodeAttribute(t_tree, "offset", m_cOffset);
35  }
36  catch(CARGoSException& ex) {
37  THROW_ARGOSEXCEPTION_NESTED("Error initializing the omnidirectional camera equipped entity \"" << GetId() << "\"", ex);
38  }
39  }
40 
41  /****************************************/
42  /****************************************/
43 
45 
46  /****************************************/
47  /****************************************/
48 
49 }
A 3D vector class.
Definition: vector3.h:29
The basic entity type.
Definition: entity.h:89
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception...
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
Basic class for an entity that contains other entities.
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
The exception that wraps all errors in ARGoS.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
Definition: entity.cpp:40
void Disable()
Disables the entity.
Definition: entity.h:275
REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(CEntity)
const std::string & GetId() const
Returns the id of this entity.
Definition: entity.h:157
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
COmnidirectionalCameraEquippedEntity(CComposableEntity *pc_parent)
Class constructor.