MobileRT  1.0
A multi platform C++ CPU progressive Ray Tracer.
Perspective.hpp
Go to the documentation of this file.
1 #ifndef COMPONENTS_CAMERAS_PERSPECTIVE_HPP
2 #define COMPONENTS_CAMERAS_PERSPECTIVE_HPP
3 
4 #include "MobileRT/Camera.hpp"
5 
6 namespace Components {
7 
14  class Perspective final : public ::MobileRT::Camera {
15  private:
16  float hFov_ {};
17  float vFov_ {};
18 
19  private:
20  static float fastArcTan(float value);
21 
22  public:
23  explicit Perspective() = delete;
24 
25  explicit Perspective(const ::glm::vec3 &position,
26  const ::glm::vec3 &lookAt, const ::glm::vec3 &up,
27  float hFov, float vFov);
28 
29  Perspective(const Perspective &perspective) = default;
30 
31  Perspective(Perspective &&perspective) noexcept = delete;
32 
33  ~Perspective() final = default;
34 
35  Perspective &operator=(const Perspective &perspective) = delete;
36 
37  Perspective &operator=(Perspective &&perspective) noexcept = delete;
38 
39  ::MobileRT::Ray generateRay(float u, float v,
40  float deviationU, float deviationV) const final;
41 
42  float getHFov() const;
43 
44  float getVFov() const;
45  };
46 }//namespace Components
47 
48 #endif //COMPONENTS_CAMERAS_PERSPECTIVE_HPP
Definition: Orthographic.hpp:6
float getHFov() const
Definition: Perspective.cpp:53
float hFov_
Definition: Perspective.hpp:16
Definition: Camera.hpp:16
Perspective & operator=(const Perspective &perspective)=delete
float vFov_
Definition: Perspective.hpp:17
Definition: Ray.hpp:13
static float fastArcTan(float value)
Definition: Perspective.cpp:40
float getVFov() const
Definition: Perspective.cpp:63
::MobileRT::Ray generateRay(float u, float v, float deviationU, float deviationV) const final
Definition: Perspective.cpp:16
~Perspective() final=default
Definition: Perspective.hpp:14