//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()))); }
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()); }
//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())); }