29using namespace Qt::StringLiterals;
182 SIP_PYOBJECT __repr__();
185 if ( sipCpp->isNull() )
187 str = u
"<QgsSphere: null>"_s.arg( sipCpp->centerX() ).arg( sipCpp->centerY() ).arg( sipCpp->centerZ() ).arg( sipCpp->radius() );
191 str = u
"<QgsSphere: (%1, %2, %3) radius %4>"_s.arg( sipCpp->centerX() ).arg( sipCpp->centerY() ).arg( sipCpp->centerZ() ).arg( sipCpp->radius() );
193 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
199 double mCenterX = std::numeric_limits< double >::quiet_NaN();
200 double mCenterY = std::numeric_limits< double >::quiet_NaN();
201 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).