ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
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;
The namespace containing all the ARGoS related code.
It defines the basic type CRadians, used to store an angle value in radians.
Basic class for an entity that contains other entities.
Real GetRange() const
Returns the range of the camera.
void SetRange(Real f_range)
Sets the range of the camera.
void SetFocalLength(Real f_focal_length)
Sets the focal length of the camera.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
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.
Real GetImageMtWidth() const
Returns the image width in meters.
Real GetFocalLength() const
Returns the focal length of the camera.
void SetAnchor(SAnchor &s_anchor)
Sets the anchor to which the camera is attached.
An anchor related to the body of an entity.
signed int SInt32
32-bit signed integer.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
SInt32 GetImagePxWidth() const
Returns the image width in pixel.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
SInt32 GetImagePxHeight() const
Returns the image height in pixel.
CPerspectiveCameraEquippedEntity(CComposableEntity *pc_parent)
Class constructor.
Real GetImageMtHeight() const
Returns the image height in meters.
const CRadians & GetAperture() const
Returns the aperture of the visibility cone of the camera.
Real Tan(const CRadians &c_radians)
Computes the tangent of the passed value in radians.
float Real
Collects all ARGoS code.
void SetAperture(const CRadians &c_aperture)
Sets the aperture of the visibility cone of the camera.