Esempio n. 1
0
 /// <summary>
 /// Grow the bounds to encapsulate the bounds.
 /// </summary>
 /// <param name="bounds">the new bounds to encapsulate.</param>
 public void Encapsulate(Bounds2D bounds)
 {
     Encapsulate(bounds.Center - bounds.Extents);
     Encapsulate(bounds.Center + bounds.Extents);
 }
Esempio n. 2
0
 public bool Intersects(Bounds2D bounds)
 {
     return((Math.Abs(Center.x - bounds.Center.x) < Extents.x + bounds.Size.x) &&
            (Math.Abs(Center.y - bounds.Center.y) < Extents.y + bounds.Extents.y));
 }