#include <VisCameraViewport.h>
Inherits Vis::Camera.
Public Member Functions | |
CameraViewport () | |
~CameraViewport () | |
const M44f & | getProjMatrix () const |
const M44f & | getViewMatrix () const |
void | update () |
void | SetPlaneAspect (float aspect) |
void | SetViewportAspect (float aspect) |
void | StartPan () |
void | StopPan () |
void | PanX (float dx) |
void | PanY (float dy) |
void | Scale (float scale) |
void | ResetView () |
V2f | GetDataHit (int viwportWidth, int viewPortHeight, int posX, int posY) |
Vis::CameraViewport::CameraViewport | ( | ) |
ctor.
Vis::CameraViewport::~CameraViewport | ( | ) |
dtor.
V2f Vis::CameraViewport::GetDataHit | ( | int | viwportWidth, | |
int | viewPortHeight, | |||
int | posX, | |||
int | posY | |||
) |
mappping from screen space to "data" space provided screen coordinates the function returns normalized coordinates, where the focused data is hit
viwportWidth | current viewport width | |
viwportHEight | current viewport height | |
posX | the hitPoint xPos | |
posY | the hitPoint yPos |
const M44f & Vis::CameraViewport::getProjMatrix | ( | ) | const [virtual] |
Returns the projection matrix defined by the camera.
Implements Vis::Camera.
const M44f & Vis::CameraViewport::getViewMatrix | ( | ) | const [virtual] |
Returns the view matrix defined by the camera.
Implements Vis::Camera.
void Vis::CameraViewport::PanX | ( | float | dx | ) |
pan the camera horizontal
dx | amount to pan |
void Vis::CameraViewport::PanY | ( | float | dy | ) |
pan the camera vertical
dy | amount to pan |
void Vis::CameraViewport::ResetView | ( | ) |
resets the camera , pan = (0.0,0.0) scale = 1.0
void Vis::CameraViewport::Scale | ( | float | scale | ) |
scale the camera
scale | amount to increase or decrease the current scale factor |
void Vis::CameraViewport::SetPlaneAspect | ( | float | aspect | ) |
set the aspect of the currently viewed plane
aspect | the aspect |
void Vis::CameraViewport::SetViewportAspect | ( | float | aspect | ) |
set the aspect of the viewport
aspect | the aspect |
void Vis::CameraViewport::StartPan | ( | ) |
starts a panning session
void Vis::CameraViewport::StopPan | ( | ) |
stops a panning session
void Vis::CameraViewport::update | ( | ) | [virtual] |
uptdate the camera proj ad view parameters (glOrtho and Transform)
Implements Vis::Camera.