Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Attributes | Private Member Functions | Friends

mrpt::opengl::CCamera Class Reference


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>

Inheritance diagram for mrpt::opengl::CCamera:
Inheritance graph
[legend]

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::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
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]

Constructor.

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 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]

Definition at line 83 of file CCamera.h.

float mrpt::opengl::CCamera::getElevationDegrees ( ) const [inline]

Definition at line 84 of file CCamera.h.

float mrpt::opengl::CCamera::getPointingAtX ( ) const [inline]

Definition at line 76 of file CCamera.h.

float mrpt::opengl::CCamera::getPointingAtY ( ) const [inline]

Definition at line 77 of file CCamera.h.

float mrpt::opengl::CCamera::getPointingAtZ ( ) const [inline]

Definition at line 78 of file CCamera.h.

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.

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]

Definition at line 81 of file CCamera.h.

bool mrpt::opengl::CCamera::isOrthogonal ( ) const [inline]

Definition at line 93 of file CCamera.h.

bool mrpt::opengl::CCamera::isProjective ( ) const [inline]

Definition at line 92 of file CCamera.h.

void mrpt::opengl::CCamera::render ( ) const [inline, virtual]

Render does nothing here.

Implements mrpt::opengl::CRenderizable.

Definition at line 101 of file CCamera.h.

void mrpt::opengl::CCamera::setAzimuthDegrees ( float  ang) [inline]

Definition at line 86 of file CCamera.h.

void mrpt::opengl::CCamera::setElevationDegrees ( float  ang) [inline]

Definition at line 87 of file CCamera.h.

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]

Definition at line 67 of file CCamera.h.

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]
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]

Definition at line 80 of file CCamera.h.


Friends And Related Function Documentation

friend class COpenGLViewport [friend]

Definition at line 51 of file CCamera.h.


Member Data Documentation

Definition at line 53 of file CCamera.h.

Definition at line 53 of file CCamera.h.

Definition at line 53 of file CCamera.h.

Definition at line 58 of file CCamera.h.

Definition at line 57 of file CCamera.h.

Definition at line 58 of file CCamera.h.

Definition at line 56 of file CCamera.h.

Definition at line 56 of file CCamera.h.

Definition at line 56 of file CCamera.h.

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.




Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011