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

Go to the source code of this file.

Classes

class  mv::math::Viewport< T >
 

Namespaces

namespace  mv
 
namespace  mv::math
 

Typedefs

using mv::math::Viewportf = Viewport< float >
 
using mv::math::Viewportd = Viewport< double >
 

Enumerations

enum class  mv::math::ViewportYAxis { mv::math::Up , mv::math::Down }
 

Functions

template<typename T >
std::optional< Point3< T > > mv::math::TryProjectPoint (const Mat4< T > &worldToClip, const Point3< T > &worldPoint) noexcept
 
template<typename T >
std::optional< Point3< T > > mv::math::TryUnprojectPointWithInverse (const Mat4< T > &clipToWorld, const Point3< T > &normalizedDevicePoint) noexcept
 
template<typename T >
std::optional< Point3< T > > mv::math::TryUnprojectPoint (const Mat4< T > &worldToClip, const Point3< T > &normalizedDevicePoint) noexcept
 
template<typename T >
std::optional< Point3< T > > mv::math::TryProjectToViewport (const Mat4< T > &worldToClip, const Point3< T > &worldPoint, const Viewport< T > &viewport, ClipDepth clipDepth, ViewportYAxis yAxis=ViewportYAxis::Down) noexcept
 
template<typename T >
std::optional< Point3< T > > mv::math::TryUnprojectFromViewportWithInverse (const Mat4< T > &clipToWorld, const Point3< T > &viewportPoint, const Viewport< T > &viewport, ClipDepth clipDepth, ViewportYAxis yAxis=ViewportYAxis::Down) noexcept
 
template<typename T >
std::optional< Ray3< T > > mv::math::TryMakeViewportRay (const Mat4< T > &clipToWorld, const Vec2< T > &viewportPosition, const Viewport< T > &viewport, ClipDepth clipDepth, DepthDirection depthDirection, ViewportYAxis yAxis=ViewportYAxis::Down) noexcept
 
template<typename T >
std::optional< Ray3< T > > mv::math::TryMakePerspectiveViewportRay (const Mat4< T > &clipToWorld, const Point3< T > &cameraOrigin, const Vec2< T > &viewportPosition, const Viewport< T > &viewport, ClipDepth clipDepth, DepthDirection depthDirection, ViewportYAxis yAxis=ViewportYAxis::Down) noexcept