Beispiel #1
0
 // Finds out if the given rectangle intersects the circle
 public bool intersects(ref BVRectangle collider)
 {
     return collider.intersects(this);
 }
Beispiel #2
0
 public bool intersects(BVRectangle collider)
 {
     return intersects(ref collider);
 }
Beispiel #3
0
        // Finds if the two rectangles are intersecting each other
        public bool intersects(ref BVRectangle collider)
        {
            if(pMax.x< collider.pMin.x || pMin.x> collider.pMax.x)
                return false;
            if(pMax.y< collider.pMin.y || pMin.y> collider.pMax.y)
                return false;

            return true;
        }