#include <lemon/dim2.h>
Public Member Functions | |
BoundingBox () | |
Default constructor: creates an empty bounding box. | |
BoundingBox (Point< T > a) | |
Construct an instance from one point. | |
bool | empty () const |
Were any points added? | |
void | clear () |
Make the BoundingBox empty. | |
Point< T > | bottomLeft () const |
Give back the bottom left corner. | |
void | bottomLeft (Point< T > p) |
Set the bottom left corner. | |
Point< T > | topRight () const |
Give back the top right corner. | |
void | topRight (Point< T > p) |
Set the top right corner. | |
Point< T > | bottomRight () const |
Give back the bottom right corner. | |
void | bottomRight (Point< T > p) |
Set the bottom right corner. | |
Point< T > | topLeft () const |
Give back the top left corner. | |
void | topLeft (Point< T > p) |
Set the top left corner. | |
T | bottom () const |
Give back the bottom of the box. | |
void | bottom (T t) |
Set the bottom of the box. | |
T | top () const |
Give back the top of the box. | |
void | top (T t) |
Set the top of the box. | |
T | left () const |
Give back the left side of the box. | |
void | left (T t) |
Set the left side of the box. | |
T | right () const |
Give back the right side of the box. | |
void | right (T t) |
Set the right side of the box. | |
T | height () const |
Give back the height of the box. | |
T | width () const |
Give back the width of the box. | |
bool | inside (const Point< T > &u) |
Checks whether a point is inside a bounding box. | |
BoundingBox & | add (const Point< T > &u) |
Increments a bounding box with a point. | |
BoundingBox & | add (const BoundingBox &u) |
Increments a bounding to contain another bounding box. | |
BoundingBox | operator & (const BoundingBox &u) |
Intersection of two bounding boxes. |
Point<T> bottomLeft | ( | ) | const [inline] |
Give back the bottom left corner. If the bounding box is empty, then the return value is not defined.
void bottomLeft | ( | Point< T > | p | ) | [inline] |
Set the bottom left corner. It should only bee used for non-empty box.
Point<T> topRight | ( | ) | const [inline] |
Give back the top right corner. If the bounding box is empty, then the return value is not defined.
void topRight | ( | Point< T > | p | ) | [inline] |
Set the top right corner. It should only bee used for non-empty box.
Point<T> bottomRight | ( | ) | const [inline] |
Give back the bottom right corner. If the bounding box is empty, then the return value is not defined.
void bottomRight | ( | Point< T > | p | ) | [inline] |
Set the bottom right corner. It should only bee used for non-empty box.
Point<T> topLeft | ( | ) | const [inline] |
Give back the top left corner. If the bounding box is empty, then the return value is not defined.
void topLeft | ( | Point< T > | p | ) | [inline] |
Set the top left corner. It should only bee used for non-empty box.
T bottom | ( | ) | const [inline] |
Give back the bottom of the box. If the bounding box is empty, then the return value is not defined.
void bottom | ( | T | t | ) | [inline] |
Set the bottom of the box. It should only bee used for non-empty box.
T top | ( | ) | const [inline] |
Give back the top of the box. If the bounding box is empty, then the return value is not defined.
void top | ( | T | t | ) | [inline] |
Set the top of the box. It should only bee used for non-empty box.
T left | ( | ) | const [inline] |
Give back the left side of the box. If the bounding box is empty, then the return value is not defined.
void left | ( | T | t | ) | [inline] |
Set the left side of the box. It should only bee used for non-empty box
T right | ( | ) | const [inline] |
Give back the right side of the box. If the bounding box is empty, then the return value is not defined.
void right | ( | T | t | ) | [inline] |
Set the right side of the box. It should only bee used for non-empty box
T height | ( | ) | const [inline] |
Give back the height of the box. If the bounding box is empty, then the return value is not defined.
T width | ( | ) | const [inline] |
Give back the width of the box. If the bounding box is empty, then the return value is not defined.