18 #ifndef QGSREGULARPOLYGON_H
19 #define QGSREGULARPOLYGON_H
23 #include "qgis_core.h"
152 void setNumberSides(
unsigned int numberSides )
SIP_HOLDGIL;
195 QString toString(
int pointPrecision = 17,
int radiusPrecision = 17,
int anglePrecision = 2 ) const;
228 unsigned int mNumberSides = 0;
229 double mRadius = 0.0;
234 double apothemToRadius(
double apothem,
unsigned int numberSides ) const;
239 double interiorAngle(
unsigned int nbSides ) const;
244 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.
Regular Polygon geometry type.
double radius() const SIP_HOLDGIL
Returns the radius.
QgsPoint firstVertex() const SIP_HOLDGIL
Returns the first vertex (corner) of the regular polygon.
unsigned int numberSides() const SIP_HOLDGIL
Returns the number of sides of the regular polygon.
ConstructionOption
A regular polygon can be constructed inscribed in a circle or circumscribed about a circle.
@ InscribedCircle
Inscribed in a circle (the radius is the distance between the center and vertices)
double apothem() const SIP_HOLDGIL
Returns the apothem of the regular polygon.
QgsRegularPolygon() SIP_HOLDGIL=default
Constructor for QgsRegularPolygon.
CORE_EXPORT std::unique_ptr< QgsPolygon > toPolygon(const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
Returns face as polygon geometry, caller is responsible for delete.
QVector< QgsPoint > QgsPointSequence