CSCI441 OpenGL Library 5.9.0
CS@Mines CSCI441 Computer Graphics Course Library
Loading...
Searching...
No Matches
OrthographicCamera.hpp
1#ifndef CSCI441_ORTHOGRAPHIC_CAMERA_HPP
2#define CSCI441_ORTHOGRAPHIC_CAMERA_HPP
3
4#include "Camera.hpp"
5
6namespace CSCI441 {
7
12 public:
22 explicit OrthographicCamera(GLfloat minX = -1.0f, GLfloat maxX = 1.0f, GLfloat minY = -1.0f, GLfloat maxY = 1.0f, GLfloat minZ = -1.0f, GLfloat maxZ = 1.0f);
23
24 private:
25 void _updateProjectionMatrix();
26
27 GLfloat _minX;
28 GLfloat _maxX;
29 GLfloat _minY;
30 GLfloat _maxY;
31 GLfloat _minZ;
32 GLfloat _maxZ;
33 };
34
35}
36
38 GLfloat minX,
39 GLfloat maxX,
40 GLfloat minY,
41 GLfloat maxY,
42 GLfloat minZ,
43 GLfloat maxZ
44) : _minX(minX), _maxX(maxX), _minY(minY), _maxY(maxY), _minZ(minZ), _maxZ(maxZ) {
45 _updateProjectionMatrix();
46}
47
48inline void CSCI441::OrthographicCamera::_updateProjectionMatrix() {
49 mProjectionMatrix = glm::ortho( _minX, _maxX, _minY, _maxY, _minZ, _maxZ );
50}
51
52#endif//CSCI441_ORTHOGRAPHIC_CAMERA_HPP
Abstract Camera class to be placed (position and orientation) within our scene.
Abstract Class to represent a synthetic camera. The following methods must be overridden:
Definition: Camera.hpp:37
Abstract Class to represent an orthographic camera. Stores box clip planes.
Definition: OrthographicCamera.hpp:11
OrthographicCamera(GLfloat minX=-1.0f, GLfloat maxX=1.0f, GLfloat minY=-1.0f, GLfloat maxY=1.0f, GLfloat minZ=-1.0f, GLfloat maxZ=1.0f)
initializes the OrthographicCamera
Definition: OrthographicCamera.hpp:37
CSCI441 Helper Functions for OpenGL.
Definition: ArcballCam.hpp:17