Let me call the original problem PN - where N is the number of measurements.
Suppose we know a solution for P1, a one-dimensional problem: find if the new interval overlaps with the given set of intervals.
Once we find out, we can check if the new rectangle overlaps with the collection of rectangles in each of the x / y / z projections.
So, the solution P3 is equivalent to P1_x AND P1_y AND P1_z.
For an effective solution to P1, we can use a sorted list. Each node in the list will include the coordinates and the number of opened-intetrvals-up-to-this-coord.
Suppose we have the following intervals: [1.5] [2.9] [3.7] [0.2]
then the list will look like this:
{0,1}, {1,2}, {2,2}, {3,3}, {5,2}, {7,1}, {9,0}
if we get a new interval, say [6,7], we will find the largest element in the list that is less than 6: {5,2} and smllest, which is more than 7: {9,0}.
So itโs easy to say that the new interval overlaps with the existing ones.
And a search in a sorted list is faster than a linear one :)