10 #ifndef opengl_CCamera_H 11 #define opengl_CCamera_H 20 class COpenGLViewport;
38 float m_pointingX,m_pointingY,m_pointingZ;
40 float m_azimuthDeg,m_elevationDeg;
42 bool m_projectiveModel;
43 float m_projectiveFOVdeg;
48 void setPointingAt(
float x,
float y,
float z) { m_pointingX=x; m_pointingY=y; m_pointingZ=z; }
50 template <
class POSEORPOINT>
55 m_pointingZ=p.is3DPoseOrPoint() ? p.m_coords[2] : 0;
float getPointingAtX() const
bool isOrthogonal() const
void setOrthogonal(bool v=true)
Enable/Disable orthogonal mode (vs. projective)
float getPointingAtZ() const
void set6DOFMode(bool v)
Set 6DOFMode, if enabled camera is set according to its pose (default=false).
The base class of 3D objects that can be directly rendered through OpenGL.
void setProjectiveModel(bool v=true)
Enable/Disable projective mode (vs. orthogonal)
float getProjectiveFOVdeg() const
Field-of-View in degs, only when projectiveModel=true (default=30 deg).
float getPointingAtY() const
double z
X,Y,Z coordinates.
float getAzimuthDegrees() const
A viewport within a COpenGLScene, containing a set of OpenGL objects to render.
void setZoomDistance(float z)
void setPointingAt(const mrpt::math::TPoint3D &p)
bool isProjective() const
void setAzimuthDegrees(float ang)
void render() const
Render does nothing here.
float getZoomDistance() const
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
void setProjectiveFOVdeg(float ang)
Field-of-View in degs, only when projectiveModel=true (default=30 deg).
virtual ~CCamera()
Private, virtual destructor: only can be deleted from smart pointers.
float getElevationDegrees() const
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setElevationDegrees(float ang)
A camera: if added to a scene, the viewpoint defined by this camera will be used instead of the camer...
void setPointingAt(const POSEORPOINT &p)
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)