Exemple #1
0
 /// <summary>
 /// Returns a distance to the closest point on the segment
 /// </summary>
 public static float PointSegment(Vector2 point, Vector2 segmentA, Vector2 segmentB)
 {
     return(Vector2.Distance(point, Closest.PointSegment(point, segmentA, segmentB)));
 }
Exemple #2
0
 /// <summary>
 /// Returns a distance to the closest point on the ray
 /// </summary>
 /// <param name="rayDirection">Normalized direction of the ray</param>
 public static float PointRay(Vector2 point, Vector2 rayOrigin, Vector2 rayDirection)
 {
     return(Vector2.Distance(point, Closest.PointRay(point, rayOrigin, rayDirection)));
 }
Exemple #3
0
 /// <summary>
 /// Returns a distance to the closest point on the ray
 /// </summary>
 public static float PointRay(Vector2 point, Ray2D ray)
 {
     return(Vector2.Distance(point, Closest.PointRay(point, ray)));
 }
Exemple #4
0
 /// <summary>
 /// Returns a distance to the closest point on the line
 /// </summary>
 public static float PointLine(Vector2 point, Vector2 lineOrigin, Vector2 lineDirection)
 {
     return(Vector2.Distance(point, Closest.PointLine(point, lineOrigin, lineDirection)));
 }
Exemple #5
0
 /// <summary>
 /// Returns a distance to the closest point on the line
 /// </summary>
 public static float PointLine(Vector2 point, Line2 line)
 {
     return(Vector2.Distance(point, Closest.PointLine(point, line)));
 }
 /// <summary>
 /// Returns a distance to the closest point on the segment
 /// </summary>
 public static float PointSegment(Vector3 point, Segment3 segment)
 {
     return(Vector3.Distance(point, Closest.PointSegment(point, segment)));
 }