Camera Class Reference

Camera class. More...

#include <camera.hpp>


Public Member Functions

 Camera (void)
 Camera-constructor.
 Camera (float fov, float neard, float fard)
 Camera-constructor.
 ~Camera ()
 Camera-destructor.
void set_campos (float *new_pos)
 Set camera position.
void set_campos3d (float nx, float ny, float nz)
 Set camera position.
void set_camorientation (float *str, float *hei, float *dir)
 Set camera vectors.
float * get_campos_ref (void)
 Get pointer to the camera-position.
float * get_xcamdir_ref (void)
 Get pointer to the camera x-axis.
float * get_ycamdir_ref (void)
 Get pointer to the camera y-axis.
float * get_zcamdir_ref (void)
 Get pointer to the camera z-axis.
void move_x (float amount)
 Move camera along x-axis.
void move_y (float amount)
 Move camera along y-axis.
void move_z (float amount)
 Move camera along z-axis.
void move_x_posheight (float amount)
 Move camera along x-axis.
void move_y_posheight (float amount)
 Move camera along y-axis.
void move_z_posheight (float amount)
 Move camera along z-axis.
void rot_x (float amount)
 Rotate the camera around its x-axis.
void rot_y (float amount)
 Rotate the camera around its y-axis.
void rot_z (float amount)
 Rotate the camera around its z-axis.
void reorient_cam_lookdown (void)
 Reorient the camera so that it faces straight down.
void set_start_time (int wct)
 Set start-time for zoom-/pan- animation.
sezap_view sezapa (sezap_view from, sezap_view to, float rho, float vel, float dt)
 Perform the zoom-/pan- animation.

Data Fields

float _campos [4]
float _xcamdir [4]
float _ycamdir [4]
float _zcamdir [4]
float _fov
float _nearplane_dist
float _farplane_dist


Detailed Description

Camera class.


Constructor & Destructor Documentation

Camera::Camera ( void   ) 

Camera-constructor.

Places the camera at (0,0,0), "looking towards the horizon".

Camera::Camera ( float  fov,
float  neard,
float  fard 
)

Camera-constructor.

Places the camera at (0,0,0), "looking towards the horizon". Sets additional parameters like field of view and near- and far- plane.

Parameters:
fov Field of view.
neard Nearplane distance.
fard Farplane distance.


Member Function Documentation

void Camera::move_x ( float  amount  ) 

Move camera along x-axis.

Parameters:
amount Determines the distance of the camera-movement along the axis.

void Camera::move_x_posheight ( float  amount  ) 

Move camera along x-axis.

Make sure that the camera's y-coordinate is larger than some threshold.

Parameters:
amount Determines the distance of the camera-movement along the axis.

void Camera::move_y ( float  amount  ) 

Move camera along y-axis.

Parameters:
amount Determines the distance of the camera-movement along the axis.

void Camera::move_y_posheight ( float  amount  ) 

Move camera along y-axis.

Make sure that the camera's y-coordinate is larger than some threshold.

Parameters:
amount Determines the distance of the camera-movement along the axis.

void Camera::move_z ( float  amount  ) 

Move camera along z-axis.

Parameters:
amount Determines the distance of the camera-movement along the axis.

void Camera::move_z_posheight ( float  amount  ) 

Move camera along z-axis.

Make sure that the camera's y-coordinate is larger than some threshold.

Parameters:
amount Determines the distance of the camera-movement along the axis.

void Camera::rot_x ( float  drx  ) 

Rotate the camera around its x-axis.

Parameters:
drx Rotationangle [rad].

void Camera::rot_y ( float  dry  ) 

Rotate the camera around its y-axis.

Parameters:
dry Rotationangle [rad].

void Camera::rot_z ( float  drz  ) 

Rotate the camera around its z-axis.

Parameters:
drz Rotationangle [rad].

void Camera::set_camorientation ( float *  str,
float *  hei,
float *  dir 
)

Set camera vectors.

Parameters:
str Pointer to a vector which contains the new camera x-axis.
hei Pointer to a vector which contains the new camera y-axis.
dir Pointer to a vector which contains the new camera z-axis.

void Camera::set_campos ( float *  new_pos  ) 

Set camera position.

Parameters:
new_pos Pointer to an array containing the desired new coordinates.

void Camera::set_campos3d ( float  nx,
float  ny,
float  nz 
)

Set camera position.

Parameters:
nx The new x-position for the camera.
ny The new y-position for the camera.
nz The new z-position for the camera.

void Camera::set_start_time ( int  wct  ) 

Set start-time for zoom-/pan- animation.

Parameters:
wct The wall-clock start-time.

sezap_view Camera::sezapa ( sezap_view  from,
sezap_view  to,
float  rho,
float  vel,
float  dt 
)

Perform the zoom-/pan- animation.

Parameters:
from Start position.
to End position.
rho Zoom/pan tradeoff factor.
vel Animation-velocity.
dt Timestep.
Returns:
Intermediate position along the animation-path.


The documentation for this class was generated from the following files:
Generated on Tue Jun 26 04:22:56 2007 for YAZAPA - yet another zooming and panning application by  doxygen 1.4.7