TCameraClassic Class Reference

This class represents simple camera with UP vector always set to [0,0,1]. More...

#include <Camera.h>

Inheritance diagram for TCameraClassic:

Inheritance graph
[legend]
Collaboration diagram for TCameraClassic:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual const TStringGetName (void) const
 Returns camera name.
virtual const TMatrix4GetViewMatrix (void) const
 Returns view matrix contained inside this camera.
virtual const TMatrix4GetProjectionMatrix (void) const
 Returns projection matrix from this camera Matrix ordering is sot to row-major.
virtual const TVector3GetPosition (void) const
 Returns position for this camera.
virtual const TVector3GetDirection (void) const
 Returns normalized vector of camera direction == normalize(target-postion).
 TCameraClassic (const TString &name, const TVector3 &position, const TVector3 &target, float fov, float aspect, float near, float far, float minZoom=5.f)
 Constructor.
 ~TCameraClassic (void)
 Desctructor.
void Rotate (float h, float v)
 Rotate with camera about specified angle in radians.
void Zoom (float zoom)
 Zoom with camera.
void RotateAndZoom (float h, float v, float zoom)
 Rotate and zoom camera.

Detailed Description

This class represents simple camera with UP vector always set to [0,0,1].

Definition at line 68 of file Camera.h.


Constructor & Destructor Documentation

TCameraClassic::TCameraClassic const TString name,
const TVector3 position,
const TVector3 target,
float  fov,
float  aspect,
float  near,
float  far,
float  minZoom = 5.f
 

Constructor.

Parameters:
name [in] name of this camera
position [in] position of eye
target [in] postion of target (point at where camera look)
fov [in] field of view of camera lens in radians
aspect [in] aspect ratio of view (width/height)
near [in] near clip plane distance
far [in] far clip plane distance
minZoom [in] minimal allowed distance between camera and target

Definition at line 29 of file Camera.cpp.

References NSMath::TVector3::Length(), NSMath::TVector3::Minus(), NSMath::NSStdMath::sqrt(), NSMath::TVector3::x, and NSMath::TVector3::y.

Here is the call graph for this function:

TCameraClassic::~TCameraClassic void   ) 
 

Desctructor.

Definition at line 76 of file Camera.cpp.


Member Function Documentation

virtual const TVector3& TCameraClassic::GetDirection void   )  const [inline, virtual]
 

Returns normalized vector of camera direction == normalize(target-postion).

Implements TCamera.

Definition at line 114 of file Camera.h.

virtual const TString& TCameraClassic::GetName void   )  const [inline, virtual]
 

Returns camera name.

Camera must have name.

Implements TCamera.

Definition at line 96 of file Camera.h.

virtual const TVector3& TCameraClassic::GetPosition void   )  const [inline, virtual]
 

Returns position for this camera.

Implements TCamera.

Definition at line 110 of file Camera.h.

virtual const TMatrix4& TCameraClassic::GetProjectionMatrix void   )  const [inline, virtual]
 

Returns projection matrix from this camera Matrix ordering is sot to row-major.

Implements TCamera.

Definition at line 106 of file Camera.h.

virtual const TMatrix4& TCameraClassic::GetViewMatrix void   )  const [inline, virtual]
 

Returns view matrix contained inside this camera.

Matrix ordering is sot to row-major.

Implements TCamera.

Definition at line 101 of file Camera.h.

void TCameraClassic::Rotate float  h,
float  v
 

Rotate with camera about specified angle in radians.

Parameters:
h [in] horizontal rotation in radians (around Z-axis)
v [in] vertical rotation in radians (up and down)

Definition at line 120 of file Camera.cpp.

References NSMath::TVector3::Minus(), NSMath::TVector3::Normalize(), NSMath::TVector3::Plus(), NSMath::TVector3::RotateZ(), NSMath::NSFastMath::SinCos(), NSMath::NSFastMath::Sqrt(), NSMath::TVector3::Sub(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z.

Here is the call graph for this function:

void TCameraClassic::RotateAndZoom float  h,
float  v,
float  zoom
 

Rotate and zoom camera.

Parameters:
h [in] horizontal rotation in radians (around Z-axis)
v [in] vertical rotation in radians (up and down)
zoom [in] zoom value

Definition at line 200 of file Camera.cpp.

References NSMath::TVector3::Minus(), NSMath::TVector3::Normalize(), NSMath::TVector3::Plus(), NSMath::TVector3::RotateZ(), NSMath::TVector3::Scale(), NSMath::NSFastMath::SinCos(), NSMath::NSFastMath::Sqrt(), NSMath::TVector3::Sub(), NSMath::TVector3::x, NSMath::TVector3::y, and NSMath::TVector3::z.

Here is the call graph for this function:

void TCameraClassic::Zoom float  zoom  ) 
 

Zoom with camera.

Parameters:
zoom [in] zoom value

Definition at line 178 of file Camera.cpp.

References NSMath::TVector3::Minus(), and NSMath::TVector3::Plus().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 28 22:42:00 2007 for Joy4D by  doxygen 1.4.6-NO