Camera Class Reference

#include <Camera.h>

List of all members.

Public Member Functions

 Camera ()
 ~Camera ()
void apply (float aspectRatio)
void processMouseEvent (int button, int state, int screenX, int screenY)
void processMotionEvent (int screenX, int screenY)
void reset ()
float getTranslationX ()
float getTranslationY ()
float getZoom ()
void setTranslationX (float value)
void setTranslationY (float value)
void setZoom (float value)
 Camera ()
 ~Camera ()
void apply (float aspectRatio)
void processMouseEvent (int button, int state, int screenX, int screenY)
void processMotionEvent (int screenX, int screenY)
void reset ()
float getTranslationX ()
float getTranslationY ()
float getZoom ()
void setTranslationX (float value)
void setTranslationY (float value)
void setZoom (float value)

Private Attributes

float translationX
float translationY
float zoom
bool rightButtonPressed
bool leftButtonPressed
int pressedX
int pressedY


Constructor & Destructor Documentation

Camera::Camera (  ) 

Constructs a new camera object

Camera::~Camera (  ) 

Destroys the camera object

Camera::Camera (  ) 

Camera::~Camera (  ) 


Member Function Documentation

void Camera::apply ( float  aspectRatio  ) 

void Camera::apply ( float  aspectRatio  ) 

Applies the camera transformation and sets the projection

Parameters:
aspectRatio Current aspect ratio of the window

float Camera::getTranslationX (  ) 

float Camera::getTranslationX (  ) 

Returns the camera translation in x direction

Returns:
camera translation in x direction

float Camera::getTranslationY (  ) 

float Camera::getTranslationY (  ) 

Returns the camera translation in y direction

Returns:
camera translation in y direction

float Camera::getZoom (  ) 

float Camera::getZoom (  ) 

Returns the zoom of the camera

Returns:
zoom of the camera

void Camera::processMotionEvent ( int  screenX,
int  screenY 
)

void Camera::processMotionEvent ( int  screenX,
int  screenY 
)

Process the motion event

Parameters:
screenX X-Coordinate of the mouse on the screen
screenY Y-Coordinate of the mouse on the screen

void Camera::processMouseEvent ( int  button,
int  state,
int  screenX,
int  screenY 
)

void Camera::processMouseEvent ( int  button,
int  state,
int  screenX,
int  screenY 
)

Process the mouse event

Parameters:
button Button which is pressed or released
state Button state
screenX X-Coordinate of the mouse on the screen
screenY Y-Coordinate of the mouse on the screen

void Camera::reset (  ) 

void Camera::reset (  ) 

Resets the camera transformations

void Camera::setTranslationX ( float  value  ) 

void Camera::setTranslationX ( float  value  ) 

Sets the translation in x direction of the camera

Parameters:
value translation in x direction of the camera

void Camera::setTranslationY ( float  value  ) 

void Camera::setTranslationY ( float  value  ) 

Sets the translation in y direction of the camera

Parameters:
value translation in y direction of the camera

void Camera::setZoom ( float  value  ) 

void Camera::setZoom ( float  value  ) 

Sets the zoom of the camera

Parameters:
value zoom of the camera


Member Data Documentation

bool Camera::leftButtonPressed [private]

Determines if the left mouse button is pressed or not

int Camera::pressedX [private]

Screencoordinates in x direction of the mouse press event

int Camera::pressedY [private]

Screencoordinates in y direction of the mouse press

Determines if the right mouse button is pressed or not

float Camera::translationX [private]

Camera translation in x direction

float Camera::translationY [private]

Camera translation in y direction

float Camera::zoom [private]

Zoom factor of the camera


The documentation for this class was generated from the following files:

Generated on Tue Jan 20 23:44:12 2009 for FlowVis by  doxygen 1.5.7.1