Detailed Description
A camera: if added to a scene, the viewpoint defined by this camera will be used instead of the camera parameters set in COpenGLViewport::m_camera.
A camera can be defined to provide a projective or orthogonal view of the world by setting the member CCamera::m_projectiveModel.
- See also:
- opengl::COpenGLScene
Definition at line 49 of file CCamera.h.
#include <mrpt/opengl/CCamera.h>
List of all members.
Public Member Functions |
void | setPointingAt (float x, float y, float z) |
template<class POSEORPOINT > |
void | setPointingAt (const POSEORPOINT &p) |
void | setPointingAt (const mrpt::math::TPoint3D &p) |
float | getPointingAtX () const |
float | getPointingAtY () const |
float | getPointingAtZ () const |
void | setZoomDistance (float z) |
float | getZoomDistance () const |
float | getAzimuthDegrees () const |
float | getElevationDegrees () const |
void | setAzimuthDegrees (float ang) |
void | setElevationDegrees (float ang) |
void | setProjectiveModel (bool v=true) |
| Enable/Disable projective mode (vs. orthogonal)
|
void | setOrthogonal (bool v=true) |
| Enable/Disable orthogonal mode (vs. projective)
|
bool | isProjective () const |
bool | isOrthogonal () const |
void | setProjectiveFOVdeg (float ang) |
| Field-of-View in degs, only when projectiveModel=true (default=30 deg).
|
float | getProjectiveFOVdeg () const |
| Field-of-View in degs, only when projectiveModel=true (default=30 deg).
|
void | render () const |
| Render does nothing here.
|
Protected Attributes |
float | m_pointingX |
float | m_pointingY |
float | m_pointingZ |
float | m_distanceZoom |
float | m_azimuthDeg |
float | m_elevationDeg |
bool | m_projectiveModel |
| If set to true (default), camera model is projective, otherwise, it's orthogonal.
|
float | m_projectiveFOVdeg |
| Field-of-View in degs, only when projectiveModel=true (default=30 deg).
|
Private Member Functions |
| CCamera () |
| Constructor.
|
virtual | ~CCamera () |
| Private, virtual destructor: only can be deleted from smart pointers.
|
Friends |
class | COpenGLViewport |
RTTI stuff |
typedef CCameraPtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_CCamera |
static mrpt::utils::TRuntimeClassId | classCCamera |
static const
mrpt::utils::TRuntimeClassId * | classinfo |
static const
mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const
mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime.
|
virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class.
|
static mrpt::utils::CObject * | CreateObject () |
static CCameraPtr | Create () |
Member Typedef Documentation
A typedef for the associated smart pointer
Definition at line 53 of file CCamera.h.
Constructor & Destructor Documentation
mrpt::opengl::CCamera::CCamera |
( |
) |
[private] |
virtual mrpt::opengl::CCamera::~CCamera |
( |
) |
[inline, private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers.
Definition at line 109 of file CCamera.h.
Member Function Documentation
static CCameraPtr mrpt::opengl::CCamera::Create |
( |
) |
[static] |
float mrpt::opengl::CCamera::getAzimuthDegrees |
( |
) |
const [inline] |
float mrpt::opengl::CCamera::getElevationDegrees |
( |
) |
const [inline] |
float mrpt::opengl::CCamera::getPointingAtX |
( |
) |
const [inline] |
float mrpt::opengl::CCamera::getPointingAtY |
( |
) |
const [inline] |
float mrpt::opengl::CCamera::getPointingAtZ |
( |
) |
const [inline] |
float mrpt::opengl::CCamera::getProjectiveFOVdeg |
( |
) |
const [inline] |
Field-of-View in degs, only when projectiveModel=true (default=30 deg).
Definition at line 96 of file CCamera.h.
float mrpt::opengl::CCamera::getZoomDistance |
( |
) |
const [inline] |
bool mrpt::opengl::CCamera::isOrthogonal |
( |
) |
const [inline] |
bool mrpt::opengl::CCamera::isProjective |
( |
) |
const [inline] |
void mrpt::opengl::CCamera::render |
( |
) |
const [inline, virtual] |
void mrpt::opengl::CCamera::setAzimuthDegrees |
( |
float |
ang ) |
[inline] |
void mrpt::opengl::CCamera::setElevationDegrees |
( |
float |
ang ) |
[inline] |
void mrpt::opengl::CCamera::setOrthogonal |
( |
bool |
v = true ) |
[inline] |
Enable/Disable orthogonal mode (vs. projective)
Definition at line 90 of file CCamera.h.
template<class POSEORPOINT >
void mrpt::opengl::CCamera::setPointingAt |
( |
const POSEORPOINT & |
p ) |
[inline] |
void mrpt::opengl::CCamera::setPointingAt |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| [inline] |
void mrpt::opengl::CCamera::setProjectiveFOVdeg |
( |
float |
ang ) |
[inline] |
Field-of-View in degs, only when projectiveModel=true (default=30 deg).
Definition at line 95 of file CCamera.h.
void mrpt::opengl::CCamera::setProjectiveModel |
( |
bool |
v = true ) |
[inline] |
Enable/Disable projective mode (vs. orthogonal)
Definition at line 89 of file CCamera.h.
void mrpt::opengl::CCamera::setZoomDistance |
( |
float |
z ) |
[inline] |
Friends And Related Function Documentation
Member Data Documentation
Field-of-View in degs, only when projectiveModel=true (default=30 deg).
Definition at line 61 of file CCamera.h.
If set to true (default), camera model is projective, otherwise, it's orthogonal.
Definition at line 60 of file CCamera.h.