+template<typename T, unsigned D>
+inline Coverage HyperBox<T, D>::get_coverage(const BoundingBox<T, D> &bbox) const
+{
+ const LinAl::Vector<T, D> &min_pt = bbox.get_minimum_point();
+ const LinAl::Vector<T, D> &max_pt = bbox.get_maximum_point();
+ LinAl::Vector<T, D> half_dim = dimensions/T(2);
+
+ Coverage coverage = FULL_COVERAGE;
+ for(unsigned i=0; i<D; ++i)
+ {
+ if(max_pt[i]<-half_dim[i] || min_pt[i]>half_dim[i])
+ return NO_COVERAGE;
+ if(min_pt[i]<-half_dim[i] || max_pt[i]>half_dim[i])
+ coverage = PARTIAL_COVERAGE;
+ }
+
+ return coverage;
+}
+