예제 #1
0
        public bool Intersects(BoundingCircle circle)
        {
            bool result;

            circle.Intersects(ref this, out result);
            return(result);
        }
예제 #2
0
 public static void FromCircle(ref BoundingCircle circle, out BoundingRectangle result)
 {
     result.Max.X = circle.Center.X + circle.Radius;
     result.Max.Y = circle.Center.Y + circle.Radius;
     result.Min.X = circle.Center.X - circle.Radius;
     result.Min.Y = circle.Center.Y - circle.Radius;
 }
예제 #3
0
        public Containment Contains(BoundingCircle circle)
        {
            Containment result;

            Contains(ref circle, out result);
            return(result);
        }
예제 #4
0
        public static BoundingRectangle FromCircle(BoundingCircle circle)
        {
            BoundingRectangle result;

            FromCircle(ref circle, out result);
            return(result);
        }
예제 #5
0
        public bool Intersects(BoundingCircle circle)
        {
            bool result;

            Intersects(ref circle, out result);
            return(result);
        }
예제 #6
0
        public float Intersects(BoundingCircle circle)
        {
            float result;

            circle.Intersects(ref this, out result);
            return(result);
        }
예제 #7
0
 public void Intersects(ref BoundingCircle circle, out bool result)
 {
     result = false;
     for (var index = 0; index < Vertices.Length; ++index)
     {
         var   index2 = (index + 1) % Vertices.Length;
         float temp;
         LineSegment.GetDistance(ref Vertices[index], ref Vertices[index2], ref circle.Center, out temp);
         if (temp <= circle.Radius)
         {
             result = true;
             break;
         }
     }
 }
예제 #8
0
 public void Contains(ref BoundingCircle circle, out Containment result)
 {
     if ((circle.Center.X + circle.Radius) <= Max.X &&
         (circle.Center.X - circle.Radius) >= Min.X &&
         (circle.Center.Y + circle.Radius) <= Max.Y &&
         (circle.Center.Y - circle.Radius) >= Min.Y)
     {
         result = Containment.Contains;
     }
     else
     {
         bool intersects;
         circle.Intersects(ref this, out intersects);
         result = intersects ? Containment.Intersects : Containment.Disjoint;
     }
 }
예제 #9
0
        public void Contains(ref BoundingCircle circle, out Containment result)
        {
            float distance;

            GetDistance(ref circle.Center, out distance);
            distance += circle.Radius;
            if (distance <= 0)
            {
                result = Containment.Contains;
            }
            else if (distance <= circle.Radius)
            {
                result = Containment.Intersects;
            }
            else
            {
                result = Containment.Disjoint;
            }
        }
예제 #10
0
 public void Intersects(ref BoundingCircle circle, out bool result)
 {
     circle.Intersects(ref this, out result);
 }