7 #ifndef PERSPECTIVE_CAMERA_EQUIPPED_ENTITY_H
8 #define PERSPECTIVE_CAMERA_EQUIPPED_ENTITY_H
11 class CPerspectiveCameraEquippedEntity;
12 class CEmbodiedEntity;
16 #include <argos3/core/simulator/entity/entity.h>
17 #include <argos3/core/simulator/physics_engine/physics_model.h>
18 #include <argos3/core/utility/math/vector3.h>
19 #include <argos3/core/utility/math/quaternion.h>
53 const std::string& str_id,
84 m_cAperture = c_aperture;
92 return m_fFocalLength;
100 m_fFocalLength = f_focal_length;
132 m_psAnchor = &s_anchor;
140 return m_nImagePxWidth;
148 return m_nImagePxHeight;
158 m_nImagePxWidth = n_width;
159 m_nImagePxHeight = n_height;
161 static_cast<Real>(m_nImagePxWidth) /
162 static_cast<Real>(m_nImagePxHeight);
164 2.0 * m_fFocalLength *
Tan(m_cAperture) /
165 Sqrt(1.0 + fAspectRatio * fAspectRatio);
166 m_fImageMtWidth = m_fImageMtHeight * fAspectRatio;
174 return m_fImageMtWidth;
182 return m_fImageMtHeight;
186 return "perspective_camera";
207 Real m_fImageMtWidth;
210 Real m_fImageMtHeight;
signed int SInt32
32-bit signed integer.
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Real Tan(const CRadians &c_radians)
Computes the tangent of the passed value in radians.
Basic class for an entity that contains other entities.
An anchor related to the body of an entity.
It defines the basic type CRadians, used to store an angle value in radians.
Real GetRange() const
Returns the range of the camera.
void SetImagePxSize(SInt32 n_width, SInt32 n_height)
Sets the image size in pixel.
const SAnchor & GetAnchor() const
Returns the offset of the camera with respect to the reference point.
SInt32 GetImagePxWidth() const
Returns the image width in pixel.
void SetFocalLength(Real f_focal_length)
Sets the focal length of the camera.
const CRadians & GetAperture() const
Returns the aperture of the visibility cone of the camera.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
void SetAnchor(SAnchor &s_anchor)
Sets the anchor to which the camera is attached.
Real GetFocalLength() const
Returns the focal length of the camera.
CPerspectiveCameraEquippedEntity(CComposableEntity *pc_parent)
Class constructor.
Real GetImageMtWidth() const
Returns the image width in meters.
SInt32 GetImagePxHeight() const
Returns the image height in pixel.
void SetRange(Real f_range)
Sets the range of the camera.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
void SetAperture(const CRadians &c_aperture)
Sets the aperture of the visibility cone of the camera.
Real GetImageMtHeight() const
Returns the image height in meters.