Beispiel #1
0
 // Finds if the cylinder collides with the box
 public bool intersects(ref BVBox collider)
 {
     return collider.intersects(this);
 }
Beispiel #2
0
 public bool intersects(BVBox collider)
 {
     return intersects(ref collider);
 }
Beispiel #3
0
        // Finds if the two rectangles are intersecting each other
        public bool intersects(ref BVBox 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;
            if(pMax.z< collider.pMin.z || pMin.z> collider.pMax.z)
                return false;

            return true;
        }