private bool Overlaps(CuboidDiagonal c1, CuboidDiagonal c2) { return(!(c1.x1 > c2.x2 || c1.y1 > c2.y2 || c1.z1 > c2.z2 || c1.x2 < c2.x1 || c1.y2 < c2.y1 || c1.z2 < c2.z1)); }
private bool Encloses(CuboidDiagonal c1, CuboidDiagonal c2) { return(c1.x1 <= c2.x1 && c1.x2 >= c2.x2 && c1.y1 <= c2.y1 && c1.y2 >= c2.y2 && c1.z1 <= c2.z1 && c1.z2 >= c2.z2); }