Antkeeper  0.0.1
Namespaces | Functions
math/projection.hpp File Reference
#include <engine/math/matrix.hpp>
#include <cmath>
#include <tuple>

Go to the source code of this file.

Namespaces

 math
 Mathematical functions and data types.
 

Functions

template<class T >
math::horizontal_fov (T v, T r)
 Calculates a horizontal FoV given a vertical FoV and aspect ratio. More...
 
template<class T >
math::vertical_fov (T h, T r)
 Calculates a vertical FoV given a horizontal FoV and aspect ratio. More...
 
template<class T >
constexpr mat4< T > math::ortho (T left, T right, T bottom, T top, T near, T far) noexcept
 Constructs an orthographic projection matrix which will transform the near and far clipping planes to [-1, 1], respectively. More...
 
template<class T >
constexpr std::tuple< mat4< T >, mat4< T > > math::ortho_inv (T left, T right, T bottom, T top, T near, T far) noexcept
 Constructs an orthographic projection matrix which will transform the near and far clipping planes to [-1, 1], respectively, along with its inverse. More...
 
template<class T >
constexpr mat4< T > math::ortho_half_z (T left, T right, T bottom, T top, T near, T far) noexcept
 Constructs an orthographic projection matrix which will transform the near and far clipping planes to [0, 1], respectively. More...
 
template<class T >
constexpr std::tuple< mat4< T >, mat4< T > > math::ortho_half_z_inv (T left, T right, T bottom, T top, T near, T far) noexcept
 Constructs an orthographic projection matrix which will transform the near and far clipping planes to [0, 1], respectively, along with its inverse. More...
 
template<class T >
mat4< T > math::perspective (T vertical_fov, T aspect_ratio, T near, T far)
 Constructs a perspective projection matrix which will transform the near and far clipping planes to [-1, 1], respectively. More...
 
template<class T >
std::tuple< mat4< T >, mat4< T > > math::perspective_inv (T vertical_fov, T aspect_ratio, T near, T far)
 Constructs a perspective projection matrix which will transform the near and far clipping planes to [-1, 1], respectively, along with its inverse. More...
 
template<class T >
mat4< T > math::perspective_half_z (T vertical_fov, T aspect_ratio, T near, T far)
 Constructs a perspective projection matrix which will transform the near and far clipping planes to [0, 1], respectively. More...
 
template<class T >
std::tuple< mat4< T >, mat4< T > > math::perspective_half_z_inv (T vertical_fov, T aspect_ratio, T near, T far)
 Constructs a perspective projection matrix which will transform the near and far clipping planes to [0, 1], respectively, along with its inverse. More...
 
template<class T >
mat4< T > math::inf_perspective_half_z_reverse (T vertical_fov, T aspect_ratio, T near)
 Constructs a perspective projection matrix, with an infinite far plane, which will transform the near and far clipping planes to [1, 0], respectively. More...
 
template<class T >
std::tuple< mat4< T >, mat4< T > > math::inf_perspective_half_z_reverse_inv (T vertical_fov, T aspect_ratio, T near)
 Constructs a perspective projection matrix, with an infinite far plane, which will transform the near and far clipping planes to [1, 0], respectively, along with its inverse. More...