|
| DIntersectableRect ()=default |
| Creates a rectangle with lower left and upper right point (0,0). More...
|
|
| DIntersectableRect (const DIntersectableRect &dr) |
| Copy constructor. More...
|
|
| DIntersectableRect (const DPoint ¢er, double width, double height) |
| Constructs a rectangle from the center point, width and height . More...
|
|
| DIntersectableRect (const DPoint &p1, const DPoint &p2) |
| Creates a rectangle with lower left point p1 and upper right point p2 . More...
|
|
| DIntersectableRect (double x1, double y1, double x2, double y2) |
| Creates a rectangle with lower left point (x1 ,y1 ) and upper right point (x1 ,y2 ). More...
|
|
double | area () const |
| Area of the rectangle. More...
|
|
DPoint | center () const |
| Center of the rectangle. More...
|
|
double | distance (const DIntersectableRect &other) const |
| Computes distance between two rectangles. More...
|
|
DIntersectableRect | intersection (const DIntersectableRect &other) const |
| Returns the rectangle resulting from intersection of this and other . Returns a rectangle with zero width and height and center (0,0) if intersection is empty. More...
|
|
bool | intersects (const DIntersectableRect &rectangle) const |
| Tests if this and the argument rectangle intersect. More...
|
|
void | move (const DPoint &point) |
| Moves the rectangle such that its center is at the given point . More...
|
|
DIntersectableRect & | operator= (const DIntersectableRect &dr) |
| Assignment operator. More...
|
|
| DRect ()=default |
| Creates a rectangle with lower left and upper right point (0,0). More...
|
|
| DRect (const DPoint &p1, const DPoint &p2) |
| Creates a rectangle with lower left point p1 and upper right point p2 . More...
|
|
| DRect (const DRect &dr) |
| Copy constructor. More...
|
|
| DRect (const DSegment &dl) |
| Creates a rectangle defined by the end points of line segment dl . More...
|
|
| DRect (double x1, double y1, double x2, double y2) |
| Creates a rectangle with lower left point (x1 ,y1 ) and upper right point (x2 ,y2 ). More...
|
|
virtual | ~DRect ()=default |
|
const DSegment | bottom () const |
| Returns the bottom side of the rectangle. More...
|
|
bool | contains (const DPoint &p) const |
| Returns true iff p lies within this rectangle, modulo the comparison epsilon OGDF_GEOM_ET. More...
|
|
double | height () const |
| Returns the height of the rectangle. More...
|
|
bool | intersection (const DSegment &segment) const |
| Returns true iff segment intersects this DRect. More...
|
|
const DSegment | left () const |
| Returns the left side of the rectangle. More...
|
|
void | normalize () |
| Normalizes the rectangle. More...
|
|
bool | operator!= (const DRect &dr) const |
| Inequality operator. More...
|
|
DRect & | operator= (const DRect &dr) |
| Assignment operator. More...
|
|
bool | operator== (const DRect &dr) const |
| Equality operator: both rectangles have the same coordinates. More...
|
|
const DPoint & | p1 () const |
| Returns the lower left point of the rectangle. More...
|
|
const DPoint & | p2 () const |
| Returns the upper right point of the rectangle. More...
|
|
const DSegment | right () const |
| Returns the right side of the rectangle. More...
|
|
const DSegment | top () const |
| Returns the top side of the rectangle. More...
|
|
double | width () const |
| Returns the width of the rectangle. More...
|
|
void | xInvert () |
| Swaps the x-coordinates of the two points. More...
|
|
void | yInvert () |
| Swaps the y-coordinates of the two points. More...
|
|
Rectangles with real coordinates.
Stores its m_area and m_center and provides methods to compute the intersection with other rectangles.
Definition at line 922 of file geometry.h.