isEmpty method

bool isEmpty()

Returns true if this box includes zero points within its bounds.

Note that a box with equal lower and upper bounds still includes one point, the one both bounds share.

Implementation

bool isEmpty() {
  // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes
  return (max.x < min.x) || (max.y < min.y) || (max.z < min.z);
}