7 #ifndef QTOPENGL_CAMERA_H
8 #define QTOPENGL_CAMERA_H
11 class CQTOpenGLCamera;
17 #include <argos3/core/utility/datatypes/datatypes.h>
18 #include <argos3/core/utility/math/ray3.h>
19 #include <argos3/core/utility/configuration/argos_configuration.h>
58 Position(-2.0f, 0.0f, 2.0f),
60 Up(
CVector3(1.0f, 0.0f, 1.0f).Normalize()),
61 Forward(
CVector3(1.0f, 0.0f, -1.0f).Normalize()),
63 LensFocalLength(0.02f),
64 MotionSensitivity(0.005),
65 RotationSensitivity(0.01) {
95 m_sSettings[m_unActiveSettings].
Do();
99 return m_sSettings[m_unActiveSettings].
Position;
103 return m_sSettings[m_unActiveSettings].
Target;
110 void Rotate(
const QPoint& c_delta);
117 return m_sSettings[m_unActiveSettings];
121 return m_sSettings[m_unActiveSettings];
125 m_unActiveSettings = un_settings;
129 return m_sSettings[n_index];
134 UInt32 m_unActiveSettings;
135 SSettings m_sSettings[12];
signed int SInt32
32-bit signed integer.
void Move(SInt32 n_forwards_backwards, SInt32 n_sideways, SInt32 n_up_down)
Real GetLensFocalLength() const
void Init(TConfigurationNode &t_tree)
Initialize from XML.
void Init(TConfigurationNode &t_tree)
void RotateLeftRight(const CRadians &c_angle)
Rotation around the local Z axis.
float Real
Collects all ARGoS code.
const CVector3 & GetTarget() const
const CVector3 & GetPosition() const
void CalculateSensitivity()
Calculate the sensitivity of the camera.
CVector3 Up
The local Z axis of the camera in the global reference frame.
void RotateLeftRight2(const CRadians &c_angle)
Rotation around the global Z axis.
CVector3 Position
The position of the camera in the global reference frame.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
It defines the basic type CDegrees, used to store an angle value in degrees.
It defines the basic type CRadians, used to store an angle value in radians.
unsigned int UInt32
32-bit unsigned integer.
void SetActiveSettings(UInt32 un_settings)
void Do()
Places this camera in the right position.
void Rotate(const QPoint &c_delta)
void Translate(const CVector3 &c_delta)
c_delta is expressed in the camera local coordinates
CVector3 Forward
The local X axis of the camera in the global reference frame.
SSettings & GetActiveSettings()
Real LensFocalLength
The focal length of the lens (if this was a real camera)
Real MotionSensitivity
Motion sensitivity.
const SSettings & GetActiveSettings() const
void RotateUpDown(const CRadians &c_angle)
Rotation around the local Y axis.
CVector3 Target
The direction of sight of the camera in the global reference frame.
The namespace containing all the ARGoS related code.
Real RotationSensitivity
Rotation sensitivity.
void CalculateYFieldOfView()
Calculates the value of YFieldOfView.
CDegrees YFieldOfView
The focal length of the camera.
CVector3 Left
The local Y axis of the camera in the global reference frame.
SSettings & GetSetting(UInt32 n_index)