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.
#include <mrpt/opengl/CCamera.h>
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 () |
mrpt::opengl::CCamera::CCamera | ( | ) | [private] |
Constructor.
virtual mrpt::opengl::CCamera::~CCamera | ( | ) | [inline, private, virtual] |
static const mrpt::utils::TRuntimeClassId* mrpt::opengl::CCamera::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::opengl::CRenderizable.
static CCameraPtr mrpt::opengl::CCamera::Create | ( | ) | [static] |
static mrpt::utils::CObject* mrpt::opengl::CCamera::CreateObject | ( | ) | [static] |
virtual mrpt::utils::CObject* mrpt::opengl::CCamera::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
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] |
virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::CCamera::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::opengl::CRenderizable.
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] |
Render does nothing here.
Implements mrpt::opengl::CRenderizable.
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] |
void mrpt::opengl::CCamera::setPointingAt | ( | const POSEORPOINT & | p | ) | [inline] |
void mrpt::opengl::CCamera::setPointingAt | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
Definition at line 64 of file CCamera.h.
References internal::y.
void mrpt::opengl::CCamera::setPointingAt | ( | const mrpt::math::TPoint3D & | p | ) | [inline] |
Definition at line 73 of file CCamera.h.
References setPointingAt(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Referenced by setPointingAt().
void mrpt::opengl::CCamera::setProjectiveFOVdeg | ( | float | ang | ) | [inline] |
void mrpt::opengl::CCamera::setProjectiveModel | ( | bool | v = true | ) | [inline] |
void mrpt::opengl::CCamera::setZoomDistance | ( | float | z | ) | [inline] |
friend class COpenGLViewport [friend] |
mrpt::utils::CLASSINIT mrpt::opengl::CCamera::_init_CCamera [static, protected] |
const mrpt::utils::TRuntimeClassId* mrpt::opengl::CCamera::classinfo [static] |
float mrpt::opengl::CCamera::m_azimuthDeg [protected] |
float mrpt::opengl::CCamera::m_distanceZoom [protected] |
float mrpt::opengl::CCamera::m_elevationDeg [protected] |
float mrpt::opengl::CCamera::m_pointingX [protected] |
float mrpt::opengl::CCamera::m_pointingY [protected] |
float mrpt::opengl::CCamera::m_pointingZ [protected] |
float mrpt::opengl::CCamera::m_projectiveFOVdeg [protected] |
bool mrpt::opengl::CCamera::m_projectiveModel [protected] |
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011 |