예제 #1
0
 //returns true if the bbox described by other intersects with this one
 public bool isOverlappedWith(InvertedAABBox2D other)
 {
     return(!((other.Top() > Bottom()) ||
              (other.Bottom() < Top()) ||
              (other.Left() > Right()) ||
              (other.Right() < Left())));
 }
예제 #2
0
 private void renderBox(InvertedAABBox2D objBox, Graphics objGraphics, Pen objPen)
 {
     objGraphics.DrawLine(objPen, (int)objBox.Left(), (int)objBox.Top(), (int)objBox.Right(), (int)objBox.Top());
     objGraphics.DrawLine(objPen, (int)objBox.Left(), (int)objBox.Bottom(), (int)objBox.Right(), (int)objBox.Bottom());
     objGraphics.DrawLine(objPen, (int)objBox.Left(), (int)objBox.Top(), (int)objBox.Left(), (int)objBox.Bottom());
     objGraphics.DrawLine(objPen, (int)objBox.Right(), (int)objBox.Top(), (int)objBox.Right(), (int)objBox.Bottom());
 }
예제 #3
0
 //returns true if the bbox described by other intersects with this one
 public bool isOverlappedWith( InvertedAABBox2D other)
 {
     return !(	(other.Top() > Bottom()) ||
                 (other.Bottom() < Top()) ||
                 (other.Left() > Right()) ||
                 (other.Right() < Left()));
 }