Examples for Camera use.
camPersp = new Camera(Camera::Type::PERSPECTIVE_3D);
Vect upPerspCam(0.0f, 1.0f, 0.0f);
Vect posPerspCam(50.0f, 50.0f, 150.0f);
Vect lookAtPerspCam(0.0f, 0.0f, 0.0f);
camPersp->setOrientAndPosition(upPerspCam, lookAtPerspCam, posPerspCam);
camPersp->updateCamera();
camOrtho = new Camera(Camera::Type::ORTHOGRAPHIC_2D);
assert(cam2D);
1.0f, 1000.0f);
Vect upOrthoCam(0.0f, 1.0f, 0.0f);
Vect posOrthoCam(0.0f, 0.0f, 0.0f);
Vect lookAtOrthoCam(0.0f, 0.0f, -1.0f);
camOrtho->setOrientAndPosition(upOrthoCam, lookAtOrthoCam, posOrthoCam);
camOrtho->updateCamera();
static int GetHeight()
Returns window's height in pixels.
Definition Game.h:161
static int GetWidth()
Returns window's width in pixels.
Definition Game.h:167