public void Intersects(ref LineSegment line, out bool result) { Scalar distance; line.GetDistance(ref Position, out distance); result = Math.Abs(distance) <= Radius; }
public void Intersects(ref BoundingCircle circle, out bool result) { result = false; for (int index = 0; index < vertexes.Length; ++index) { int index2 = (index + 1) % vertexes.Length; Scalar temp; LineSegment.GetDistance(ref vertexes[index], ref vertexes[index2], ref circle.Position, out temp); if (temp <= circle.Radius) { result = true; break; } } }