MobileRT  1.0
A multi platform C++ CPU progressive Ray Tracer.
Components::Orthographic Class Referencefinal

#include <Orthographic.hpp>

Inheritance diagram for Components::Orthographic:
Inheritance graph
Collaboration diagram for Components::Orthographic:
Collaboration graph

Public Member Functions

 Orthographic ()=delete
 
 Orthographic (const ::glm::vec3 &position, const ::glm::vec3 &lookAt, const ::glm::vec3 &up, float sizeH, float sizeV)
 
 Orthographic (const Orthographic &orthographic)=default
 
 Orthographic (Orthographic &&orthographic) noexcept=delete
 
 ~Orthographic () final=default
 
Orthographicoperator= (const Orthographic &orthographic)=delete
 
Orthographicoperator= (Orthographic &&orthographic) noexcept=delete
 
::MobileRT::Ray generateRay (float u, float v, float deviationU, float deviationV) const final
 
::MobileRT::AABB getAABB () const final
 
float getSizeH () const
 
float getSizeV () const
 
- Public Member Functions inherited from MobileRT::Camera
 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
 
Cameraoperator= (const Camera &camera)=default
 
Cameraoperator= (Camera &&camera) noexcept=default
 

Private Attributes

float sizeH_ {}
 
float sizeV_ {}
 

Additional Inherited Members

- Public Attributes inherited from MobileRT::Camera
::glm::vec3 position_ {}
 
::glm::vec3 direction_ {}
 
::glm::vec3 right_ {}
 
::glm::vec3 up_ {}
 
- Static Protected Member Functions inherited from MobileRT::Camera
static float degToRad (float deg)
 
static float radToDeg (float rad)
 

Detailed Description

A class which represents an Orthographic camera in the scene.

This type of camera is similar to the isometric view of some games. Different from normal perspective cameras, an object's apparent scale isn't affected by its distance from the camera. So, with this camera, an object's size in the rendered image stays constant regardless of its distance from the camera.

Constructor & Destructor Documentation

◆ Orthographic() [1/4]

Components::Orthographic::Orthographic ( )
explicitdelete

◆ Orthographic() [2/4]

Components::Orthographic::Orthographic ( const ::glm::vec3 &  position,
const ::glm::vec3 &  lookAt,
const ::glm::vec3 &  up,
float  sizeH,
float  sizeV 
)
explicit

◆ Orthographic() [3/4]

Components::Orthographic::Orthographic ( const Orthographic orthographic)
default

◆ Orthographic() [4/4]

Components::Orthographic::Orthographic ( Orthographic &&  orthographic)
deletenoexcept

◆ ~Orthographic()

Components::Orthographic::~Orthographic ( )
finaldefault

Member Function Documentation

◆ generateRay()

Ray Orthographic::generateRay ( float  u,
float  v,
float  deviationU,
float  deviationV 
) const
finalvirtual

Generates a ray with the origin in the camera.

Parameters
uu = x / width
vv = y / height
deviationUdeviationU = [-0.5F / width, 0.5F / width]
deviationVdeviationV = [-0.5F / height, 0.5F / height]
Returns
The new generated ray.

Implements MobileRT::Camera.

◆ getAABB()

AABB Orthographic::getAABB ( ) const
finalvirtual

Calculates the bounding box of the camera.

Returns
The bounding box which surrounds the camera.

Reimplemented from MobileRT::Camera.

◆ getSizeH()

float Orthographic::getSizeH ( ) const
Here is the caller graph for this function:

◆ getSizeV()

float Orthographic::getSizeV ( ) const

◆ operator=() [1/2]

Orthographic& Components::Orthographic::operator= ( const Orthographic orthographic)
delete

◆ operator=() [2/2]

Orthographic& Components::Orthographic::operator= ( Orthographic &&  orthographic)
deletenoexcept

Member Data Documentation

◆ sizeH_

float Components::Orthographic::sizeH_ {}
private

◆ sizeV_

float Components::Orthographic::sizeV_ {}
private

The documentation for this class was generated from the following files: