template<typename T, unsigned D>
struct UnionOps
{
- static HyperBox<T, D> combine_aabb(const HyperBox<T, D> &, const HyperBox<T, D> &);
+ static BoundingBox<T, D> combine_aabb(const BoundingBox<T, D> &a, const BoundingBox<T, D> &b) { return a|b; }
static bool init_inside() { return false; }
static bool combine_inside(bool a, bool b) { return a || b; }
static bool is_inside_decided(bool a) { return a; }
return new Union<T, D>(*this);
}
-
-template<typename T, unsigned D>
-inline HyperBox<T, D> UnionOps<T, D>::combine_aabb(const HyperBox<T, D> &box1, const HyperBox<T, D> &box2)
-{
- LinAl::Vector<T, D> dimensions;
- for(unsigned i=0; i<D; ++i)
- dimensions[i] = std::max(box1.get_dimension(i), box2.get_dimension(i));
- return HyperBox<T, D>(dimensions);
-}
-
} // namespace Geometry
} // namespace Msp