18#ifndef QGSREGULARPOLYGON_H
19#define QGSREGULARPOLYGON_H
150 void setNumberSides(
unsigned int numberSides )
SIP_HOLDGIL;
193 QString toString(
int pointPrecision = 17,
int radiusPrecision = 17,
int anglePrecision = 2 ) const;
226 unsigned int mNumberSides = 0;
227 double mRadius = 0.0;
232 double apothemToRadius(
double apothem,
unsigned int numberSides ) const;
237 double interiorAngle(
unsigned int nbSides ) const;
242 double centralAngle(
unsigned int nbSides ) const;
Line string geometry type, with support for z-dimension and m-values.
Point geometry type, with support for z-dimension and m-values.
QgsRegularPolygon()=default
Constructor for QgsRegularPolygon.
QgsPoint center() const
Returns the center point of the regular polygon.
QgsPoint firstVertex() const
Returns the first vertex (corner) of the regular polygon.
ConstructionOption
A regular polygon can be constructed inscribed in a circle or circumscribed about a circle.
@ CircumscribedCircle
Circumscribed about a circle (the radius is the distance from the center to the midpoints of the side...
@ InscribedCircle
Inscribed in a circle (the radius is the distance between the center and vertices).
double radius() const
Returns the radius.
unsigned int numberSides() const
Returns the number of sides of the regular polygon.
bool isEmpty() const
A regular polygon is empty if radius equal to 0 or number of sides < 3.
double apothem() const
Returns the apothem of the regular polygon.
QVector< QgsPoint > QgsPointSequence