1 #ifndef MF_BOUNDING_BOX_H_
2 #define MF_BOUNDING_BOX_H_
17 using edge = std::pair<Eigen::Vector3f, Eigen::Vector3f>;
18 using face = std::array<Eigen::Vector3f, 4>;
29 bounding_box(
const Eigen::Vector3f& o,
const Eigen::Vector3f& e);
31 Eigen::Vector3f
center()
const;
38 bool contains(
const Eigen::Vector3f&)
const;
Eigen::Vector3f center() const
Definition: bounding_box.cc:16
corners_array corners() const
Definition: bounding_box.cc:53
Eigen::Vector3f origin
Definition: bounding_box.h:24
float minimal_distance_sq(const bounding_box &a, const bounding_box &b)
Definition: bounding_box.cc:107
faces_array faces() const
Definition: bounding_box.cc:94
std::array< edge, 12 > edges_array
Definition: bounding_box.h:21
std::pair< Eigen::Vector3f, Eigen::Vector3f > edge
Definition: bounding_box.h:17
Eigen::Vector3f side_lengths() const
Definition: bounding_box.cc:20
std::array< Eigen::Vector3f, 4 > face
Definition: bounding_box.h:18
float volume() const
Definition: bounding_box.cc:29
float minimal_distance(const bounding_box &a, const bounding_box &b)
Definition: bounding_box.h:63
float maximal_distance_sq(const bounding_box &a, const bounding_box &b)
Definition: bounding_box.cc:122
void expand_extremity(float ep=0.1)
Definition: bounding_box.cc:34
bool contains(const Eigen::Vector3f &) const
Definition: bounding_box.cc:38
Axis-aligned 3D cuboid bounding box.
Definition: bounding_box.h:16
float side_length(std::ptrdiff_t i=0) const
Definition: bounding_box.cc:24
std::array< face, 6 > faces_array
Definition: bounding_box.h:22
friend std::ostream & operator<<(std::ostream &, const bounding_box &)
Definition: bounding_box.cc:187
static bounding_box from_string(const std::string &)
Definition: bounding_box.cc:176
std::string to_string() const
Definition: bounding_box.cc:164
float maximal_distance(const bounding_box &a, const bounding_box &b)
Definition: bounding_box.h:59
edges_array edges() const
Definition: bounding_box.cc:70
std::array< Eigen::Vector3f, 8 > corners_array
Definition: bounding_box.h:20
Eigen::Vector3f extremity
Definition: bounding_box.h:25