t
Loading...
Searching...
No Matches
OrthographicCamera.hpp
1#include "cameras/Camera.hpp"
2
3#ifndef ORTHOGRAPHICCAMERA_HPP
4#define ORTHOGRAPHICCAMERA_HPP
5
6namespace t {
7
37class OrthographicCamera : public Camera {
38public:
39 double left;
40 double right;
41 double top;
42 double bottom;
43 double near;
44 double far;
62 OrthographicCamera(double _left, double _right, double _top, double _bottom,
63 double _near, double _far)
65 2 / (_right - _left), 0, 0, -(_right + _left) / (_right - _left), 0,
66 2 / (_top - _bottom), 0, -(_top + _bottom) / (_top - _bottom), 0, 0,
67 -2 / (_far - _near), -(_far + _near) / (_far - _near), 0, 0, 0, 1)),
68 left(_left), right(_right), top(_top), bottom(_bottom), near(_near),
69 far(_far) {};
70};
71
72} // namespace t
73
74#endif // ORTHOGRAPHICCAMERA_HPP
The base camera class.
Definition Camera.hpp:26
The matrix class.
Definition Matrix4x4.hpp:35
The orthographic projection camera.
Definition OrthographicCamera.hpp:37
double far
The far plane of this camera's view frustum.
Definition OrthographicCamera.hpp:44
double top
The top plane of this camera's view frustum.
Definition OrthographicCamera.hpp:41
double right
The right plane of this camera's view frustum.
Definition OrthographicCamera.hpp:40
double bottom
The bottom plane of this camera's view frustum.
Definition OrthographicCamera.hpp:42
OrthographicCamera(double _left, double _right, double _top, double _bottom, double _near, double _far)
Creates a new orthographic camera with the specified planes as the view frustum.
Definition OrthographicCamera.hpp:62
double near
The near plane of this camera's view frustum.
Definition OrthographicCamera.hpp:43
double left
The left plane of this camera's view frustum.
Definition OrthographicCamera.hpp:39
The t software 3D graphics library namespace.
Definition algorithms.hpp:12