Lugdunum  0.1.0
Camera.inl
Go to the documentation of this file.
1 inline void Camera::setName(const std::string& name) {
2  _name = name;
3 }
4 
5 inline void Camera::setType(Type type) {
6  _type = type;
7 }
8 
9 inline void Camera::setFovY(float fovy) {
10  LUG_ASSERT(_type == Camera::Type::Perspective, "You need to build a persepctive camera to set the fov y");
11  _fovy = fovy;
12 }
13 
14 inline void Camera::setAspectRatio(float aspectRatio) {
15  LUG_ASSERT(_type == Camera::Type::Perspective, "You need to build a persepctive camera to set the aspect ratio");
16  _aspectRatio = aspectRatio;
17 }
18 
19 inline void Camera::setXMag(float xmag) {
20  LUG_ASSERT(_type == Camera::Type::Orthographic, "You need to build a orthographic camera to set the x magnification");
21  _xmag = xmag;
22 }
23 
24 inline void Camera::setYMag(float ymag) {
25  LUG_ASSERT(_type == Camera::Type::Orthographic, "You need to build a orthographic camera to set the y magnification");
26  _ymag = ymag;
27 }
28 
29 inline void Camera::setZNear(float znear) {
30  _znear = znear;
31 }
32 
33 inline void Camera::setZFar(float zfar) {
34  _zfar = zfar;
35 }
36 
#define LUG_ASSERT(assertion, message)
Definition: Debug.hpp:38