-
Notifications
You must be signed in to change notification settings - Fork 1
/
Camera.hpp
39 lines (34 loc) · 1.18 KB
/
Camera.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
** EPITECH PROJECT, 2023
** bootstrap
** File description:
** Camera
*/
#ifndef CAMERA_HPP_
#define CAMERA_HPP_
#include "./Maths/Vector3D.hpp"
#include "Ray.hpp"
namespace raytracer {
class Camera {
public:
Camera() {};
Camera(Math::Vector3D from, Math::Vector3D at, Math::Vector3D vup, double vfov, double ratio, double aperture, double focus, double t0, double t1);
Ray getRay(double s, double t) const;
double getRatio(void) const {return _ratio;};
Math::Vector3D getDirection(void) const {return _direction;};
Math::Vector3D getPos(void) const {return _from;};
~Camera() = default;
private:
Math::Vector3D _origin;
Math::Vector3D _lower_left_corner;
Math::Vector3D _horizontal;
Math::Vector3D _vertical;
Math::Vector3D _u, _v, _w;
double time0, time1;
double _lens_radius;
double _ratio;
Math::Vector3D _direction;
Math::Vector3D _from;
};
}
#endif /* !CAMERA_HPP_ */