Optimized intersects and octantContaining