Пример #1
0
 public static bool PointProject(Segment2 segment, Vector2 point, out Vector2 result)
 {
     return(PointProject(segment.P, segment.Q, point, out result));
 }
Пример #2
0
 public static int CircleIntersect(Segment2 segment, Vector2 center, float radius,
                                   out Vector2 intersection1, out Vector2 intersection2, float epsilon = float.Epsilon)
 {
     return(CircleIntersect(segment.P, segment.Q,
                            center, radius, out intersection1, out intersection2, epsilon));
 }
Пример #3
0
 public bool Equals(Segment2 other)
 {
     return(P == other.P && Q == other.Q);
 }
Пример #4
0
 public static bool IntersectAsLine(
     Segment2 first, Segment2 second,
     out Vector2 point, float epsilon = float.Epsilon)
 {
     return(IntersectAsLine(first.P, first.Q, second.P, second.Q, out point, epsilon));
 }
Пример #5
0
 public bool IntersectAsLine(Segment2 other, out Vector2 point)
 {
     return(IntersectAsLine(this, other, out point));
 }
Пример #6
0
 public static float Distance(Segment2 segment, Vector2 point)
 {
     return(Distance(segment.P, segment.Q, point));
 }
Пример #7
0
 public static float SqrDistanceAsLine(Segment2 segment, Vector2 point)
 {
     return(SqrDistanceAsLine(segment.P, segment.Q, point));
 }
Пример #8
0
 public static float SqrDistance(Segment2 first, Segment2 second, float epsilon = float.Epsilon)
 {
     return(SqrDistance(first.P, first.Q, second.P, second.Q, epsilon));
 }
Пример #9
0
 public static void ClosestPoints(Segment2 first, Segment2 second,
                                  out Vector2 pointOnFirst, out Vector2 pointOnSecond, float epsilon = float.Epsilon)
 {
     ClosestPoints(first.P, first.Q, second.P, second.Q,
                   out pointOnFirst, out pointOnSecond, epsilon);
 }
Пример #10
0
 public static SegmentRelation RelationInfo(
     Segment2 first, Segment2 second, out Vector2 intersection, float epsilon = float.Epsilon)
 {
     return(RelationInfo(first.P, first.Q, second.P, second.Q, out intersection, epsilon));
 }
Пример #11
0
 public static SegmentRelation Relation(
     Segment2 first, Segment2 second, float epsilon = float.Epsilon)
 {
     return(Relation(first.P, first.Q, second.P, second.Q, epsilon));
 }
Пример #12
0
 public static bool IsPerpendicular(
     Segment2 first, Segment2 second, float epsilon = float.Epsilon)
 {
     return(IsPerpendicular(first.P, first.Q, second.P, second.Q, epsilon));
 }