RectangleOverlap
RectangleOverlap Class Reference
#include <rectangleoverlap.h>
Public Member Functions | |
RectangleOverlap (const QPointF ¢er, int width, int height, double rotationDegrees=0.0) | |
bool | intersects (const QPointF ¢er, int width, int height, double rotationDegrees=0.0) const |
Detailed Description
This class checks if two rectangles overlap.
It is more general that QRect::intersects in that the rectangles are not necessarily aligned to the axes (that is they can be specified as rotated around their center points).
Checks if two potentially rotated rectangles intersect.
Definition at line 26 of file rectangleoverlap.h.
Constructor & Destructor Documentation
◆ RectangleOverlap()
RectangleOverlap::RectangleOverlap | ( | const QPointF & | center, |
int | width, | ||
int | height, | ||
double | rotationDegrees = 0.0 ) |
Constructor specifying reference rectangle.
- Parameters
-
center the center of the rectangle width its width height its height rotationDegrees amount in degrees the rectangle is rotated counter-clockwise
Definition at line 87 of file rectangleoverlap.cpp.
Member Function Documentation
◆ intersects()
bool RectangleOverlap::intersects | ( | const QPointF & | center, |
int | width, | ||
int | height, | ||
double | rotationDegrees = 0.0 ) const |
Check if the input rectangle overlaps the reference rectangle.
- Parameters
-
center the center of the input rectangle width its width height its height rotationDegrees amount in degrees the rectangle is rotated counter-clockwise
- Returns
- true if the rectangles overlap
Definition at line 92 of file rectangleoverlap.cpp.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:51:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:51:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.