177 SIP_PYOBJECT __repr__();
180 if ( sipCpp->isNull() )
182 str = QStringLiteral(
"<QgsSphere: null>" ).arg( sipCpp->centerX() ).arg( sipCpp->centerY() ).arg( sipCpp->centerZ() ).arg( sipCpp->radius() );
186 str = QStringLiteral(
"<QgsSphere: (%1, %2, %3) radius %4>" ).arg( sipCpp->centerX() ).arg( sipCpp->centerY() ).arg( sipCpp->centerZ() ).arg( sipCpp->radius() );
188 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
193 double mCenterX = std::numeric_limits< double >::quiet_NaN();
194 double mCenterY = std::numeric_limits< double >::quiet_NaN();
195 double mCenterZ = std::numeric_limits< double >::quiet_NaN();
A 3-dimensional box composed of x, y, z coordinates.
Point geometry type, with support for z-dimension and m-values.
QgsSphere()=default
Constructor for an invalid QgsSphere.
double centerY() const
Returns the y-coordinate of the center of the sphere.
double radius() const
Returns the radius of the sphere.
double diameter() const
Returns the diameter of the sphere.
void setCenter(double x, double y, double z)
Sets the center point of the sphere to (x, y, z).
bool operator!=(const QgsSphere &other) const
double centerZ() const
Returns the z-coordinate of the center of the sphere.
void setRadius(double radius)
Sets the radius of the sphere.
double centerX() const
Returns the x-coordinate of the center of the sphere.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference).