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). More... | |
Rectangle (double b, double t, double l, double r) | |
Public Attributes | |
double | bot |
The bottom of a rectangle. More... | |
double | left |
The left side of a rectangle. More... | |
double | right |
The right side of a rectangle. More... | |
double | top |
The top of a rectangle. More... | |
Defines an axis-aligned rectangle.
Definition at line 20 of file geometry_utils.h.
|
inline |
Creates a rectangle with zero area in point (0,0).
Definition at line 23 of file geometry_utils.h.
|
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.
|
inline |
Returns an area of a rectangle.
Definition at line 49 of file geometry_utils.h.
|
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.