gwnavruntime/navmesh/closestpoint.h Source File
Go to the documentation of this file.
20 static void OnSegmentVsPoint2d(
const Vec3f& a,
const Vec3f& b,
const Vec3f& p, Vec3f& closestPointOnSegment,
KyFloat32& squareDist2d);
24 static void OnTriangleVsPoint2d(
const Vec3f& v1,
const Vec3f& v2,
const Vec3f& v3,
const Vec3f& p, Vec3f& closestPointOnTriangle,
KyFloat32& squareDist2d);
27 static void OnSegmentVsSegmentCast2d(
const Vec3f& v1,
const Vec3f& v2,
const Vec3f& a,
const Vec3f& b,
30 static void OnTriangleVsSegmentCast2d(
const Vec3f& v1,
const Vec3f& v2,
const Vec3f& v3,
const Vec3f& a,
31 const Vec3f& b,
const KyFloat32 distCast, Vec3f& closestPointonTriangle,
KyFloat32& squareDist2d);
34 static void OnSegmentVsDiskCast2d(
const Vec3f& v1,
const Vec3f& v2,
const Vec3f& center,
const KyFloat32 radius,
35 const Vec2f& normalizedDir2D,
const KyFloat32 distCast, Vec3f& closestPointonTriangle,
KyFloat32& squareDist2d);
37 static void OnTriangleVsDiskCast2d(
const Vec3f& v1,
const Vec3f& v2,
const Vec3f& v3,
const Vec3f& center,
const KyFloat32 radius,
38 const Vec2f& normalizedDir2D,
const KyFloat32 distCast, Vec3f& closestPointonTriangle,
KyFloat32& squareDist2d);
41 static void OnSegmentVsConeCast2d(
const Vec3f& v1,
const Vec3f& v2,
const Vec3f& apex,
const Vec2f& normalizedDir2D,
KyFloat32 length,
42 const KyFloat32 halfAngleSine, Vec3f& closestPointonTriangle,
KyFloat32& squareDist2d);
44 static void OnTriangleVsConeCast2d(
const Vec3f& v1,
const Vec3f& v2,
const Vec3f& v3,
const Vec3f& apex,
const Vec2f& normalizedDir2D,
58 static KyFloat32 GetSquareDistancePointToSegment(
const Vec2f& P,
const Vec2f& A,
const Vec2f& B);
59 static KyFloat32 GetSquareDistancePointToSegment(
const Vec2f& P,
const Vec2f& A,
const Vec2f& B,
const KyFloat32& sqDistAB);
60 static KyFloat32 GetSquareDistancePointToSegmentFactorSegmentSquareLength(
const Vec2f& P,
const Vec2f& A,
const Vec2f& B,
KyFloat32 sqDistAB);
61 static KyFloat32 GetSquareDistanceSegmentToSegment(
const Vec2f& P,
const Vec2f& Q,
const Vec2f& A,
const Vec2f& B);
63 static bool OnSegmentVsDisk2dIfIntersection(
const Vec3f& A,
const Vec3f& B,
const Vec3f& C,
KyFloat32 radius, Vec3f& intersection);
64 static bool OnSegmentCapsule2dIfIntersection(
const Vec3f& P,
const Vec3f& Q,
const Vec3f& A,
const Vec3f& B,
KyFloat32 radius, Vec3f& intersection);
67 KY_INLINE
KyFloat32 ClosestPoint::GetSquareDistancePointToSegment(
const Vec2f& P,
const Vec2f& A,
const Vec2f& B) {
return GetSquareDistancePointToSegment(P, A, B,
SquareDistance(A, B)); }
std::uint64_t KyUInt64
uint64_t
Definition: types.h:30
KyFloat32 SquareDistance(const Vec2f &A, const Vec2f &B)
Returns the square of the distance between A and B.
Definition: vec2f.h:130
std::int64_t KyInt64
int64_t
Definition: types.h:25
Vec2LL CoordPos64
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:16
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
float KyFloat32
float
Definition: types.h:32