Пример #1
0
 /// <summary>
 /// Checks whether this point is on a line segment.
 /// </summary>
 /// <param name="line">The line segment</param>
 /// <returns>True if the point lies on the line segment</returns>
 public static bool IsOnLineSegment(this Vector3 point, Line3 line)
 {
     return(MathUtils.IsPointOnLineSegment(line, point));
 }
Пример #2
0
 /// <summary>
 /// Finds a point which is a projection from this point to a line segment. If the projected point lies outside of the line segment, the projected point will be clamped to the appropriate line end.
 /// </summary>
 /// <param name="line">The line to project to</param>
 /// <returns>The projected point</returns>
 public static Vector3 ProjectedOnLineSegment(this Vector3 point, Line3 line)
 {
     return(MathUtils.ProjectPointOnLineSegment(line, point));
 }