Move Vectormath main
C++20 game and graphics mathematics
Loading...
Searching...
No Matches
Projection.hpp File Reference
#include <cmath>
#include <optional>
#include <type_traits>
#include <mv/math/Angles.hpp>
#include <mv/math/Mat4.hpp>

Go to the source code of this file.

Namespaces

namespace  mv
 
namespace  mv::math
 
namespace  mv::math::detail
 

Enumerations

enum class  mv::math::Handedness { mv::math::Left , mv::math::Right }
 
enum class  mv::math::ClipDepth { mv::math::ZeroToOne , mv::math::NegativeOneToOne }
 
enum class  mv::math::DepthDirection { mv::math::Forward , mv::math::Reverse }
 

Functions

template<typename T >
constexpr T mv::math::detail::NearClipDepth (ClipDepth clipDepth, DepthDirection depthDirection) noexcept
 
template<typename T >
constexpr T mv::math::detail::FarClipDepth (ClipDepth clipDepth, DepthDirection depthDirection) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
std::optional< Mat4< T > > mv::math::TryPerspectiveFov (Radians< T > verticalFieldOfView, T aspectRatio, T nearPlane, T farPlane, Handedness handedness, ClipDepth clipDepth, DepthDirection depthDirection) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
std::optional< Mat4< T > > mv::math::TryPerspectiveFovInfinite (Radians< T > verticalFieldOfView, T aspectRatio, T nearPlane, Handedness handedness, ClipDepth clipDepth, DepthDirection depthDirection) noexcept
 
template<typename T >
requires std::is_floating_point_v<T>
std::optional< Mat4< T > > mv::math::TryOrthographicOffCenter (T left, T right, T bottom, T top, T nearPlane, T farPlane, Handedness handedness, ClipDepth clipDepth, DepthDirection depthDirection) noexcept