コード例 #1
0
 //returns true if the bbox described by other intersects with this one
 public bool isOverlappedWith(InvertedAABBox2D other)
 {
     return !((other.Top() > this.Bottom()) ||
     (other.Bottom() < this.Top()) ||
     (other.Left() > this.Right()) ||
     (other.Right() < this.Left()));
 }
コード例 #2
0
 //returns true if the bbox described by other intersects with this one
 public bool isOverlappedWith(InvertedAABBox2D other)
 {
     return(!((other.Top() > this.Bottom()) ||
              (other.Bottom() < this.Top()) ||
              (other.Left() > this.Right()) ||
              (other.Right() < this.Left())));
 }
コード例 #3
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());
 }