Class BoundingBox
Defined in File BoundingBox.h
Class Documentation
-
class BoundingBox
Simple class for representing a bounding box.
Public Functions
-
inline BoundingBox()
Construct infinite/invalid bounding box.
-
inline BoundingBox(const Point &min, const Point &max)
Construct from min and max points.
-
inline BoundingBox &operator+=(const Point &p)
Add point to the bounding box.
-
inline BoundingBox &operator+=(const BoundingBox &bb)
Add two bounding boxes.
-
inline Point &min()
Get min point.
-
inline const Point &min() const
Get min point.
-
inline Point &max()
Get max point.
-
inline const Point &max() const
Get max point.
-
inline Point center() const
Get center point.
-
inline size_t longest_axis() const
Get index of longest axis (0=x, 1=y, 2=z).
-
inline Scalar longest_axis_size() const
Get length of longest axis.
-
inline bool is_empty() const
Indicate if the bounding box is empty.
-
inline Scalar size() const
Get the size of the bounding box.
-
inline bool contains(const Point &p) const
Indicate if p is inside the bounding box.
-
inline bool overlaps(const BoundingBox &bb) const
Indicate if bb overlaps this bounding box.
-
inline BoundingBox overlap(const BoundingBox &bb) const
-
inline std::array<BoundingBox, 2> split(int axis, float threshold) const
-
inline BoundingBox()