MobileRT
1.0
A multi platform C++ CPU progressive Ray Tracer.
|
#include <Perspective.hpp>
Public Member Functions | |
Perspective ()=delete | |
Perspective (const ::glm::vec3 &position, const ::glm::vec3 &lookAt, const ::glm::vec3 &up, float hFov, float vFov) | |
Perspective (const Perspective &perspective)=default | |
Perspective (Perspective &&perspective) noexcept=delete | |
~Perspective () final=default | |
Perspective & | operator= (const Perspective &perspective)=delete |
Perspective & | operator= (Perspective &&perspective) noexcept=delete |
::MobileRT::Ray | generateRay (float u, float v, float deviationU, float deviationV) const final |
float | getHFov () const |
float | getVFov () const |
![]() | |
Camera (const ::glm::vec3 &position, const ::glm::vec3 &lookAt, const ::glm::vec3 &up) | |
Camera (const Camera &camera) | |
Camera (Camera &&camera) noexcept=default | |
virtual | ~Camera ()=default |
Camera & | operator= (const Camera &camera)=default |
Camera & | operator= (Camera &&camera) noexcept=default |
virtual AABB | getAABB () const |
Static Private Member Functions | |
static float | fastArcTan (float value) |
Private Attributes | |
float | hFov_ {} |
float | vFov_ {} |
Additional Inherited Members | |
![]() | |
::glm::vec3 | position_ {} |
::glm::vec3 | direction_ {} |
::glm::vec3 | right_ {} |
::glm::vec3 | up_ {} |
![]() | |
static float | degToRad (float deg) |
static float | radToDeg (float rad) |
A class which represents a Perspective camera in the scene.
This type of camera is designed to mimic the way the human eye sees. It is the most common projection mode used for rendering a 3D scene.
|
explicitdelete |
|
explicit |
|
default |
|
deletenoexcept |
|
finaldefault |
|
staticprivate |
Helper method that calculates the inverse tangent function. This is an approximate algorithm from this source .
value | The value to calculate the arc tangent. |
|
finalvirtual |
Generates a ray with the origin in the camera.
u | u = x / width |
v | v = y / height |
deviationU | deviationU = [-0.5F / width, 0.5F / width] |
deviationV | deviationV = [-0.5F / height, 0.5F / height] |
Implements MobileRT::Camera.
float Perspective::getHFov | ( | ) | const |
Gets the horizontal field of view, in degrees.
float Perspective::getVFov | ( | ) | const |
Gets the vertical field of view, in degrees.
|
delete |
|
deletenoexcept |
|
private |
|
private |