Added 3D version of CollisionsHelper::ClosestPointPointLine().

This commit is contained in:
intolerantape
2021-01-19 23:09:23 -08:00
parent 049450e31b
commit f3f25836e2
2 changed files with 31 additions and 0 deletions

View File

@@ -72,6 +72,15 @@ public:
/// <param name="result">When the method completes, contains the closest point between the two objects.</param>
static void ClosestPointPointLine(const Vector2& point, const Vector2& p0, const Vector2& p1, Vector2& result);
/// <summary>
/// Determines the closest point between a point and a line.
/// </summary>
/// <param name="point">The point to test.</param>
/// <param name="p0">The line first point.</param>
/// <param name="p1">The line second point.</param>
/// <param name="result">When the method completes, contains the closest point between the two objects.</param>
static Vector3 ClosestPointPointLine(const Vector3& point, const Vector3& p0, const Vector3& p1);
/// <summary>
/// Determines the closest point between a point and a triangle.
/// </summary>