Defines an axis-aligned rectangle. More...
#include <geometry_utils.h>
Public Member Functions | |
| double | area () const |
| bool | does_contain (double x, double y) const |
| Rectangle () | |
| Creates a rectangle with zero area in point (0,0). | |
| Rectangle (double b, double t, double l, double r) | |
Public Attributes | |
| double | bot |
| The bottom of a rectangle. | |
| double | left |
| The left side of a rectangle. | |
| double | right |
| The right side of a rectangle. | |
| double | top |
| The top of a rectangle. | |
Defines an axis-aligned rectangle.
Definition at line 20 of file geometry_utils.h.
| Rectangle::Rectangle | ( | ) | [inline] |
Creates a rectangle with zero area in point (0,0).
Definition at line 23 of file geometry_utils.h.
| Rectangle::Rectangle | ( | double | b, |
| double | t, | ||
| double | l, | ||
| double | r | ||
| ) | [inline] |
Creates a rectangle where all contained points are bounded in limits l < x < r, b < y < t.
| b | The bottom of a rectangle. |
| t | The top of a rectangle. |
| l | The left side of a rectangle. |
| r | The right side of a rectangle. |
Definition at line 33 of file geometry_utils.h.
| double Rectangle::area | ( | ) | const [inline] |
Returns an area of a rectangle.
Definition at line 49 of file geometry_utils.h.
| bool Rectangle::does_contain | ( | double | x, |
| double | y | ||
| ) | const [inline] |
Tests whether a rectangle contains a point.
| x,y | Coordinates of a target point. |
Definition at line 41 of file geometry_utils.h.
| double Rectangle::bot |
The bottom of a rectangle.
Definition at line 53 of file geometry_utils.h.
| double Rectangle::left |
The left side of a rectangle.
Definition at line 53 of file geometry_utils.h.
| double Rectangle::right |
The right side of a rectangle.
Definition at line 53 of file geometry_utils.h.
| double Rectangle::top |
The top of a rectangle.
Definition at line 53 of file geometry_utils.h.