Move Vectormath main
C++20 game and graphics mathematics
Loading...
Searching...
No Matches
mv::math::detail Namespace Reference

Classes

struct  RayAabbSlabSolution
 
struct  RayPlaneSolution
 
struct  RaySphereSolution
 
struct  RayTriangleSolution
 

Typedefs

template<typename T >
using QueryCalculation = std::conditional_t< std::is_same_v< T, float >, double, long double >
 

Functions

template<typename T >
std::optional< Plane3< T > > TryPlaneFromCoefficients (T x, T y, T z, T offset) noexcept
 
template<typename T >
T Component (const Vec3< T > &value, std::size_t axis) noexcept
 
template<typename T >
T Component (const Point3< T > &value, std::size_t axis) noexcept
 
template<typename T >
Normal3< T > AxisNormal (std::size_t axis, T sign) noexcept
 
template<typename T >
bool IsStrictlyInside (const Aabb3< T > &box, const Point3< T > &point) noexcept
 
template<typename T >
std::optional< RayAabbSlabSolution< T > > TryIntersectPreparedAabbSlabs (const PreparedRay3< T > &prepared, const Aabb3< T > &box) noexcept
 
template<typename T >
bool IntersectsPreparedAabbSlabs (const PreparedRay3< T > &prepared, const Aabb3< T > &box) noexcept
 
template<typename T >
std::optional< RaySphereSolution< T > > TryIntersectRaySphere (const Ray3< T > &ray, const Sphere3< T > &sphere) noexcept
 
template<typename T >
T PointDistanceSquared (const Point3< T > &first, const Point3< T > &second) noexcept
 
template<typename T >
QueryCalculation< T > DotPrecise (const Vec3< T > &first, const Vec3< T > &second) noexcept
 
template<typename T >
PointTriangleClosest3< T > MakePointTriangleClosest (const Point3< T > &point, const Point3< T > &pointOnTriangle, const Vec3< T > &barycentric) noexcept
 
template<typename T >
std::optional< RayPlaneSolution< T > > TryIntersectRayPlane (const Ray3< T > &ray, const Plane3< T > &plane, T parallelTolerance) noexcept
 
template<typename T >
std::optional< RayTriangleSolution< T > > TryIntersectRayTriangle (const Ray3< T > &ray, const Triangle3< T > &triangle, RayTriangleOptions< T > options) noexcept
 
template<typename T >
std::optional< Normal3< T > > TryTransformNormalImpl (const AffineTransform3< T > &transform, const Normal3< T > &normal, bool preserveHalfSpaceOrientation) noexcept
 
template<typename T >
constexpr T NearClipDepth (ClipDepth clipDepth, DepthDirection depthDirection) noexcept
 
template<typename T >
constexpr T FarClipDepth (ClipDepth clipDepth, DepthDirection depthDirection) noexcept
 

Typedef Documentation

◆ QueryCalculation

template<typename T >
using mv::math::detail::QueryCalculation = typedef std::conditional_t<std::is_same_v<T, float>, double, long double>

Definition at line 30 of file ClosestPointQueries.hpp.

Function Documentation

◆ AxisNormal()

template<typename T >
Normal3< T > mv::math::detail::AxisNormal ( std::size_t  axis,
T  sign 
)
inlinenoexcept

Definition at line 43 of file BoundsQueries.hpp.

◆ Component() [1/2]

template<typename T >
T mv::math::detail::Component ( const Point3< T > &  value,
std::size_t  axis 
)
inlinenoexcept

Definition at line 32 of file BoundsQueries.hpp.

◆ Component() [2/2]

template<typename T >
T mv::math::detail::Component ( const Vec3< T > &  value,
std::size_t  axis 
)
inlinenoexcept

Definition at line 21 of file BoundsQueries.hpp.

◆ DotPrecise()

template<typename T >
QueryCalculation< T > mv::math::detail::DotPrecise ( const Vec3< T > &  first,
const Vec3< T > &  second 
)
inlinenoexcept

Definition at line 34 of file ClosestPointQueries.hpp.

◆ FarClipDepth()

template<typename T >
constexpr T mv::math::detail::FarClipDepth ( ClipDepth  clipDepth,
DepthDirection  depthDirection 
)
constexprnoexcept

Definition at line 44 of file Projection.hpp.

◆ IntersectsPreparedAabbSlabs()

template<typename T >
bool mv::math::detail::IntersectsPreparedAabbSlabs ( const PreparedRay3< T > &  prepared,
const Aabb3< T > &  box 
)
inlinenoexcept

Definition at line 165 of file BoundsQueries.hpp.

◆ IsStrictlyInside()

template<typename T >
bool mv::math::detail::IsStrictlyInside ( const Aabb3< T > &  box,
const Point3< T > &  point 
)
inlinenoexcept

Definition at line 53 of file BoundsQueries.hpp.

◆ MakePointTriangleClosest()

template<typename T >
PointTriangleClosest3< T > mv::math::detail::MakePointTriangleClosest ( const Point3< T > &  point,
const Point3< T > &  pointOnTriangle,
const Vec3< T > &  barycentric 
)
inlinenoexcept

Definition at line 47 of file ClosestPointQueries.hpp.

◆ NearClipDepth()

template<typename T >
constexpr T mv::math::detail::NearClipDepth ( ClipDepth  clipDepth,
DepthDirection  depthDirection 
)
constexprnoexcept

Definition at line 33 of file Projection.hpp.

◆ PointDistanceSquared()

template<typename T >
T mv::math::detail::PointDistanceSquared ( const Point3< T > &  first,
const Point3< T > &  second 
)
inlinenoexcept

Definition at line 23 of file ClosestPointQueries.hpp.

◆ TryIntersectPreparedAabbSlabs()

template<typename T >
std::optional< RayAabbSlabSolution< T > > mv::math::detail::TryIntersectPreparedAabbSlabs ( const PreparedRay3< T > &  prepared,
const Aabb3< T > &  box 
)
inlinenoexcept

Definition at line 81 of file BoundsQueries.hpp.

◆ TryIntersectRayPlane()

template<typename T >
std::optional< RayPlaneSolution< T > > mv::math::detail::TryIntersectRayPlane ( const Ray3< T > &  ray,
const Plane3< T > &  plane,
T  parallelTolerance 
)
inlinenoexcept

Definition at line 46 of file LinearQueries.hpp.

◆ TryIntersectRaySphere()

template<typename T >
std::optional< RaySphereSolution< T > > mv::math::detail::TryIntersectRaySphere ( const Ray3< T > &  ray,
const Sphere3< T > &  sphere 
)
inlinenoexcept

Definition at line 220 of file BoundsQueries.hpp.

◆ TryIntersectRayTriangle()

template<typename T >
std::optional< RayTriangleSolution< T > > mv::math::detail::TryIntersectRayTriangle ( const Ray3< T > &  ray,
const Triangle3< T > &  triangle,
RayTriangleOptions< T >  options 
)
inlinenoexcept

Definition at line 87 of file LinearQueries.hpp.

◆ TryPlaneFromCoefficients()

template<typename T >
std::optional< Plane3< T > > mv::math::detail::TryPlaneFromCoefficients ( T  x,
T  y,
T  z,
T  offset 
)
inlinenoexcept

Definition at line 92 of file Frustum3.hpp.

◆ TryTransformNormalImpl()

template<typename T >
std::optional< Normal3< T > > mv::math::detail::TryTransformNormalImpl ( const AffineTransform3< T > &  transform,
const Normal3< T > &  normal,
bool  preserveHalfSpaceOrientation 
)
inlinenoexcept

Definition at line 39 of file AffineTransform3Semantics.hpp.