+ if(abs(point[i])>dimensions[i]/T(2))
+ return false;
+ return true;
+}
+
+template<typename T, unsigned D>
+inline unsigned HyperBox<T, D>::get_intersections(const Ray<T, D> &ray, SurfacePoint<T, D> *points, unsigned size) const
+{
+ using std::abs;
+
+ if(size>2)
+ size = 2;
+
+ LinAl::Vector<T, D> half_dim = dimensions/T(2);
+ unsigned n = 0;
+ for(unsigned i=0; (n<size && i<D); ++i)
+ {
+ if(!ray.get_direction()[i])
+ continue;
+
+ for(int j=-1; (n<size && j<=1); j+=2)