Belle II Software
release-08-01-10
|
A two dimensional rectangle that keeps track of the extend of a drawing. More...
#include <BoundingBox.h>
Public Member Functions | |
BoundingBox () | |
Default constructor for ROOT compatibility. Cell weight defaults to 1. | |
BoundingBox (float x1, float y1, float x2, float y2) | |
Initialises the bounds of the rectangle to the given values. Automatically swaps the x or y values if they are given in a decreasing. | |
void | operator&= (const BoundingBox &other) |
Expands the bounding box such that it also covers the given bounding box. | |
void | expand (float delta) |
Expands the rectangle in each direction by the given value delta. | |
float | getWidth () const |
Getter for the width of the bounding box rectangle. | |
float | getHeight () const |
Getter for the height of the bounding box rectangle. | |
float | getLeft () const |
Getter for the location of the left of the bounding box rectangle (lower x bound). NAN if unset. | |
float | getBottom () const |
Getter for the location of the bottom of the bounding box rectangle (lower y bound). NAN if unset. | |
float | getRight () const |
Getter for the location of the right of the bounding box rectangle (upper x bound). NAN if unset. | |
float | getTop () const |
Getter for the location of the top of the bounding box rectangle (upper y bound). NAN if unset. | |
void | clear () |
Clears all bounds to NAN. | |
Private Attributes | |
float | m_left |
Memory for the lower x bound of the rectangle. | |
float | m_bottom |
Memory for the lower y bound of the rectangle. | |
float | m_right |
Memory for the upper x bound of the rectangle. | |
float | m_top |
Memory for the upper y bound of the rectangle. | |
A two dimensional rectangle that keeps track of the extend of a drawing.
Definition at line 21 of file BoundingBox.h.