BoundingBox
BoundingBox
#include <boundingbox.hpp>
Public Functions
| Name | |
|---|---|
| BoundingBox(float min_x_, float min_y_, float max_x_, float max_y_) | |
| bool | contains(float x, float y) const |
| bool | intersects(BoundingBox const & other) const |
| float | width() const |
| float | height() const |
| float | center_x() const |
| float | center_y() const |
| Point2D< float > | min() const |
| Point2D< float > | max() const |
| BoundingBox(Point2D< T > const & min_point, Point2D< T > const & max_point) | |
| BoundingBox(T const & min_x, T const & min_y, T const & max_x, T const & max_y) | |
| T | width() const |
| T | height() const |
| T | area() const |
| bool | contains(Point2D< T > const & point) const |
| bool | intersects(BoundingBox const & other) const |
| bool | contains(BoundingBox const & other) const |
| bool | operator==(BoundingBox const & other) const |
| bool | operator!=(BoundingBox const & other) const |
| bool | operator<(BoundingBox const & other) const |
Public Attributes
| Name | |
|---|---|
| float | min_x |
| float | min_y |
| float | max_x |
| float | max_y |
| Point2D< T > | min_point |
| Point2D< T > | max_point |
Detailed Description
template <typename T >
struct BoundingBox;Public Functions Documentation
function BoundingBox
inline BoundingBox(
float min_x_,
float min_y_,
float max_x_,
float max_y_
)function contains
inline bool contains(
float x,
float y
) constfunction intersects
inline bool intersects(
BoundingBox const & other
) constfunction width
inline float width() constfunction height
inline float height() constfunction center_x
inline float center_x() constfunction center_y
inline float center_y() constfunction min
inline Point2D< float > min() constfunction max
inline Point2D< float > max() constfunction BoundingBox
inline BoundingBox(
Point2D< T > const & min_point,
Point2D< T > const & max_point
)function BoundingBox
inline BoundingBox(
T const & min_x,
T const & min_y,
T const & max_x,
T const & max_y
)function width
inline T width() constfunction height
inline T height() constfunction area
inline T area() constfunction contains
inline bool contains(
Point2D< T > const & point
) constfunction intersects
inline bool intersects(
BoundingBox const & other
) constfunction contains
inline bool contains(
BoundingBox const & other
) constfunction operator==
inline bool operator==(
BoundingBox const & other
) constfunction operator!=
inline bool operator!=(
BoundingBox const & other
) constfunction operator<
inline bool operator<(
BoundingBox const & other
) constPublic Attributes Documentation
variable min_x
float min_x;variable min_y
float min_y;variable max_x
float max_x;variable max_y
float max_y;variable min_point
Point2D< T > min_point;variable max_point
Point2D< T > max_point;Updated on 2026-11-13 at 20:25:39 +0000