void OBB::getInterval(const OBB& box, const Vec3& axis, float &min, float &max)const { Vec3 corners[8]; box.getCorners(corners); float value; min = max = projectPoint(axis, corners[0]); for(int i = 1; i < 8; i++) { value = projectPoint(axis, corners[i]); min = MIN(min, value); max = MAX(max, value); } }