Skip to main content

BoundingBox

BoundingBox

More…

#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
) const

function intersects

inline bool intersects(
    BoundingBox const & other
) const

function width

inline float width() const

function height

inline float height() const

function center_x

inline float center_x() const

function center_y

inline float center_y() const

function min

inline Point2D< float > min() const

function max

inline Point2D< float > max() const

function 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() const

function height

inline T height() const

function area

inline T area() const

function contains

inline bool contains(
    Point2D< T > const & point
) const

function intersects

inline bool intersects(
    BoundingBox const & other
) const

function contains

inline bool contains(
    BoundingBox const & other
) const

function operator==

inline bool operator==(
    BoundingBox const & other
) const

function operator!=

inline bool operator!=(
    BoundingBox const & other
) const

function operator<

inline bool operator<(
    BoundingBox const & other
) const

Public 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