#include <lemon/xy.h>
Public Member Functions | |
BoundingBox () | |
Default constructor: creates an empty bounding box. | |
BoundingBox (xy< T > a) | |
Constructing the instance from one point. | |
bool | empty () const |
Were any points added? | |
void | clear () |
Makes the BoundingBox empty. | |
xy< T > | bottomLeft () const |
Gives back the bottom left corner (if the bounding box is empty, then the return value is not defined). | |
xy< T > | topRight () const |
Gives back the top right corner (if the bounding box is empty, then the return value is not defined). | |
xy< T > | bottomRight () const |
Gives back the bottom right corner (if the bounding box is empty, then the return value is not defined). | |
xy< T > | topLeft () const |
Gives back the top left corner (if the bounding box is empty, then the return value is not defined). | |
T | bottom () const |
Gives back the bottom of the box (if the bounding box is empty, then the return value is not defined). | |
T | top () const |
Gives back the top of the box (if the bounding box is empty, then the return value is not defined). | |
T | left () const |
Gives back the left side of the box (if the bounding box is empty, then the return value is not defined). | |
T | right () const |
Gives back the right side of the box (if the bounding box is empty, then the return value is not defined). | |
T | height () const |
Gives back the height of the box (if the bounding box is empty, then the return value is not defined). | |
T | width () const |
Gives back the width of the box (if the bounding box is empty, then the return value is not defined). | |
bool | inside (const xy< T > &u) |
Checks whether a point is inside a bounding box. | |
BoundingBox & | add (const xy< T > &u) |
Increments a bounding box with a point. | |
BoundingBox & | add (const BoundingBox &u) |
Increments a bounding box with an other bounding box. | |
BoundingBox | operator+ (const BoundingBox &u) |
Sums two bounding boxes. | |
BoundingBox | operator & (const BoundingBox &u) |
Intersection of two bounding boxes. |