Camera

Overview

Used to manipulate the camera, in match view and elsewhere

Variables

SPoint at : location of the camera
double dist : distance from the target
double distTarget : desired distance from the target
double panSpeed :speed cap for camera panning
double zoomSpeed : speed cap for camera zooming
SPoint target
double minDist : minimum distance the camera must remain from it's target
double yFOV_Rad : y field of view
double aRatio : aspect ratio

void c_Camera::UpdatePos()

Updates the camera, calculating the position for the current frame.


void c_Camera::SetAspectRatio(double w, double h)

Sets the aspect ratio of the viewport, with 'w' being width and 'h' being height


void c_Camera::SetTarget(SPoint p)

Sets the view target for the camera


void c_Camera::FocusPlayer(SPoint p)

Focuses the camera on a given player.


void c_Camera::ZoomToWidth(double w)

zooms the camera so that the distance represented by 'w' is visible on the screen.