QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
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;
248 #endif // QGSREGULARPOLYGON_H
Point geometry type, with support for z-dimension and m-values.
QgsPoint firstVertex() const SIP_HOLDGIL
Returns the first vertex (corner) of the regular polygon.
@ InscribedCircle
Inscribed in a circle (the radius is the distance between the center and vertices)
Line string geometry type, with support for z-dimension and m-values.
unsigned int numberSides() const SIP_HOLDGIL
Returns the number of sides of the regular polygon.
CORE_EXPORT std::unique_ptr< QgsPolygon > toPolygon(const QgsMeshFace &face, const QVector< QgsMeshVertex > &vertices)
Returns face as polygon geometry, caller is responsible for delete.
double apothem() const SIP_HOLDGIL
Returns the apothem of the regular polygon.
ConstructionOption
A regular polygon can be constructed inscribed in a circle or circumscribed about a circle.
double radius() const SIP_HOLDGIL
Returns the radius.
QVector< QgsPoint > QgsPointSequence
Regular Polygon geometry type.