Equip boost adapter with extensive 3D bounding box support

This commit is contained in:
tamasmeszaros 2022-06-13 15:34:31 +02:00
parent a7e50b7a98
commit 621ec86dbe

View File

@ -96,6 +96,36 @@ struct indexed_access<Slic3r::BoundingBox, 1, d> {
}
};
template <class T> using BB3 = Slic3r::BoundingBox3Base<Slic3r::Vec<3, T>>;
template<class T> struct tag<BB3<T>> {
using type = box_tag;
};
template<class T> struct point_type<BB3<T>> {
using type = Slic3r::Vec<3, T>;
};
template<class T, std::size_t d>
struct indexed_access<BB3<T>, 0, d> {
static inline coord_t get(BB3<T> const& box) {
return box.min(d);
}
static inline void set(BB3<T> &box, coord_t const& coord) {
box.min(d) = coord;
}
};
template<class T, std::size_t d>
struct indexed_access<BB3<T>, 1, d> {
static inline coord_t get(BB3<T> const& box) {
return box.max(d);
}
static inline void set(BB3<T> &box, coord_t const& coord) {
box.max(d) = coord;
}
};
}
}