45 void move(
double bearing,
double distance);
83 bool isValid()
const {
return _points.count() > 2; }
89 double minimumXY()
const;
A list of Line objects with spatial query helpers.
Represents a 2D line segment between two Point endpoints.
A list of Point objects with corner-finding helpers.
A 2D floating-point point extending QPointF with movement and spatial query methods.
A 2D polygon defined by an ordered list of vertices.
bool isValid() const
Test whether this polygon has at least 3 vertices.
Line::List lines() const
Return the edges of the polygon as a list of lines.
void appendPoint(const Point &point)
Append a vertex to the polygon.
double area() const
Compute the area of the polygon using the shoelace formula.
Point centroid() const
Compute the centroid (geometric centre) of the polygon.
Rectangle boundingRectangle() const
Return the bounding rectangle of this polygon.
static Polygon fromLine(const Line &line, int expandBy)
Construct a rectangle-shaped polygon from a line expanded by a width.
bool contains(const Point &point) const
Test whether a point lies inside the polygon.
Polygon()
Default constructor — creates an empty (invalid) polygon.
void rotate(const Point ¢roid, double angle)
Rotate all vertices around a centroid by an angle.
void move(double bearing, double distance)
Move all vertices by a bearing and distance.
A 2D rectangle extending QRectF with edge, corner, and geometric query helpers.