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