Exemplo n.º 1
0
        public void Intersects(ref LineSegment line, out bool result)
        {
            Scalar distance;

            line.GetDistance(ref Position, out distance);
            result = Math.Abs(distance) <= Radius;
        }
Exemplo n.º 2
0
 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;
         }
     }
 }