15#ifndef O2_MCH_CONTOUR_BBOX_H
16#define O2_MCH_CONTOUR_BBOX_H
36 throw std::invalid_argument(
"BBox should be created valid (xmin<xmax and ymin<ymax)");
40 T
xmin()
const {
return mXmin; }
42 T
xmax()
const {
return mXmax; }
44 T
ymin()
const {
return mYmin; }
46 T
ymax()
const {
return mYmax; }
66 os <<
"mTopLeft: " <<
box.xmin() <<
"," <<
box.ymax() <<
" mBottomRight: " <<
box.xmax() <<
"," <<
box.ymin();
85 return BBox<T>(
box.xmin() - extraWidth / 2.0,
box.ymin() - extraHeight / 2.0,
box.xmax() + extraWidth / 2.0,
86 box.ymax() + extraHeight / 2.0);
92 return BBox<T>{std::max(
a.xmin(),
b.xmin()), std::max(
a.ymin(),
b.ymin()), std::min(
a.xmax(),
b.xmax()),
93 std::min(
a.ymax(),
b.ymax())};
friend bool operator==(const BBox &lhs, const BBox &rhs)
friend std::ostream & operator<<(std::ostream &os, const BBox &box)
friend bool operator!=(const BBox &lhs, const BBox &rhs)
bool contains(const BBox< T > &a) const
BBox(T xmin, T ymin, T xmax, T ymax)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei const GLint * box
bool areEqual(double a, double b)
BBox< T > intersect(const BBox< T > &a, const BBox< T > &b)
BBox< T > enlarge(const BBox< T > &box, T extraWidth, T extraHeight)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...