Move Vectormath main
C++20 game and graphics mathematics
Loading...
Searching...
No Matches
ClosestPointQueries.hpp File Reference
#include <algorithm>
#include <cmath>
#include <optional>
#include <type_traits>
#include <mv/math/geometry/Aabb3.hpp>
#include <mv/math/geometry/Capsule3.hpp>
#include <mv/math/geometry/Line3.hpp>
#include <mv/math/geometry/Plane3.hpp>
#include <mv/math/geometry/Ray3.hpp>
#include <mv/math/geometry/Segment3.hpp>
#include <mv/math/geometry/Sphere3.hpp>
#include <mv/math/geometry/Triangle3.hpp>
#include <mv/math/queries/QueryTypes.hpp>

Go to the source code of this file.

Namespaces

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

Typedefs

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

Functions

template<typename T >
T mv::math::detail::PointDistanceSquared (const Point3< T > &first, const Point3< T > &second) noexcept
 
template<typename T >
QueryCalculation< T > mv::math::detail::DotPrecise (const Vec3< T > &first, const Vec3< T > &second) noexcept
 
template<typename T >
PointTriangleClosest3< T > mv::math::detail::MakePointTriangleClosest (const Point3< T > &point, const Point3< T > &pointOnTriangle, const Vec3< T > &barycentric) noexcept
 
template<typename T >
PointLineClosest3< T > mv::math::ClosestPoints (const Point3< T > &point, const Line3< T > &line) noexcept
 
template<typename T >
PointRayClosest3< T > mv::math::ClosestPoints (const Point3< T > &point, const Ray3< T > &ray) noexcept
 
template<typename T >
PointSegmentClosest3< T > mv::math::ClosestPoints (const Point3< T > &point, const Segment3< T > &segment) noexcept
 
template<typename T >
PointPlaneClosest3< T > mv::math::ClosestPoints (const Point3< T > &point, const Plane3< T > &plane) noexcept
 
template<typename T >
PointTriangleClosest3< T > mv::math::ClosestPoints (const Point3< T > &point, const Triangle3< T > &triangle) noexcept
 
template<typename T >
std::optional< PointAabbClosest3< T > > mv::math::TryClosestPoints (const Point3< T > &point, const Aabb3< T > &box) noexcept
 
template<typename T >
PointSphereClosest3< T > mv::math::ClosestPoints (const Point3< T > &point, const Sphere3< T > &sphere) noexcept
 
template<typename T >
PointCapsuleClosest3< T > mv::math::ClosestPoints (const Point3< T > &point, const Capsule3< T > &capsule) noexcept
 
template<typename T >
SegmentSegmentClosest3< T > mv::math::ClosestPoints (const Segment3< T > &first, const Segment3< T > &second) noexcept
 
template<typename T >
Point3< T > mv::math::ClosestPoint (const Point3< T > &point, const Line3< T > &line) noexcept
 
template<typename T >
Point3< T > mv::math::ClosestPoint (const Point3< T > &point, const Ray3< T > &ray) noexcept
 
template<typename T >
Point3< T > mv::math::ClosestPoint (const Point3< T > &point, const Segment3< T > &segment) noexcept
 
template<typename T >
Point3< T > mv::math::ClosestPoint (const Point3< T > &point, const Plane3< T > &plane) noexcept
 
template<typename T >
Point3< T > mv::math::ClosestPoint (const Point3< T > &point, const Triangle3< T > &triangle) noexcept
 
template<typename T >
std::optional< Point3< T > > mv::math::TryClosestPoint (const Point3< T > &point, const Aabb3< T > &box) noexcept
 
template<typename T >
Point3< T > mv::math::ClosestPoint (const Point3< T > &point, const Sphere3< T > &sphere) noexcept
 
template<typename T >
Point3< T > mv::math::ClosestPoint (const Point3< T > &point, const Capsule3< T > &capsule) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Point3< T > &point, const Line3< T > &line) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Point3< T > &point, const Ray3< T > &ray) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Point3< T > &point, const Segment3< T > &segment) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Point3< T > &point, const Plane3< T > &plane) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Point3< T > &point, const Triangle3< T > &triangle) noexcept
 
template<typename T >
std::optional< T > mv::math::TryDistanceSquared (const Point3< T > &point, const Aabb3< T > &box) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Point3< T > &point, const Sphere3< T > &sphere) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Point3< T > &point, const Capsule3< T > &capsule) noexcept
 
template<typename T >
T mv::math::DistanceSquared (const Segment3< T > &first, const Segment3< T > &second) noexcept
 
template<typename T >
T mv::math::Distance (const Point3< T > &point, const Line3< T > &line) noexcept
 
template<typename T >
T mv::math::Distance (const Point3< T > &point, const Ray3< T > &ray) noexcept
 
template<typename T >
T mv::math::Distance (const Point3< T > &point, const Segment3< T > &segment) noexcept
 
template<typename T >
T mv::math::Distance (const Point3< T > &point, const Plane3< T > &plane) noexcept
 
template<typename T >
T mv::math::Distance (const Point3< T > &point, const Triangle3< T > &triangle) noexcept
 
template<typename T >
std::optional< T > mv::math::TryDistance (const Point3< T > &point, const Aabb3< T > &box) noexcept
 
template<typename T >
T mv::math::Distance (const Point3< T > &point, const Sphere3< T > &sphere) noexcept
 
template<typename T >
T mv::math::Distance (const Point3< T > &point, const Capsule3< T > &capsule) noexcept
 
template<typename T >
bool mv::math::Contains (const Capsule3< T > &capsule, const Point3< T > &point) noexcept
 
template<typename T >
T mv::math::Distance (const Segment3< T > &first, const Segment3< T > &second) noexcept