Bounding Box¶
File: samarium/math/BoundingBox.hpp
-
namespace sm
-
template<concepts::Number T = f64>
struct BoundingBox¶ -
Public Functions
-
template<concepts::Number U>
inline constexpr auto as() const¶
-
inline constexpr auto validate()¶
-
inline constexpr auto validated() const¶
-
inline constexpr auto diagonal() const noexcept¶
-
inline constexpr auto clamped_to(BoundingBox<T> bounds) const¶
-
inline constexpr auto width() const¶
-
inline constexpr auto height() const¶
-
inline constexpr auto x_range() const¶
-
inline constexpr auto y_range() const¶
-
constexpr bool operator==(const BoundingBox<T>&) const = default¶
-
inline constexpr auto centre() const noexcept¶
-
inline constexpr auto set_width(f64 new_width) noexcept¶
-
inline constexpr auto set_height(f64 new_height) noexcept¶
Public Static Functions
-
static inline constexpr auto fit(const auto &points)¶
Make a BoundingBox which fits a range of points.
- Parameters:
points – points to fit around
-
template<concepts::Number U>
-
template<concepts::Number T = f64>