// Finds if the cylinder collides with the box public bool intersects(ref BVBox collider) { return collider.intersects(this); }
public bool intersects(BVBox collider) { return intersects(ref collider); }
// 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; }