1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgssphere.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsSphere
{
%Docstring(signature="appended")
A spherical geometry object.
Represents a simple 3-dimensional sphere.
.. versionadded:: 3.34
%End
%TypeHeaderCode
#include "qgssphere.h"
%End
public:
QgsSphere() /HoldGIL/;
%Docstring
Constructor for an invalid QgsSphere.
%End
QgsSphere( double x, double y, double z, double radius ) /HoldGIL/;
%Docstring
Constructor for QgsSphere with the specified center (``x``, ``y``,
``z``) and ``radius``.
%End
bool operator==( const QgsSphere &other ) const;
bool operator!=( const QgsSphere &other ) const;
bool isNull() const /HoldGIL/;
%Docstring
Returns ``True`` if the sphere is a null (default constructed) sphere.
%End
bool isEmpty() const /HoldGIL/;
%Docstring
Returns ``True`` if the sphere is considered empty, i.e. it has a radius
of 0.
%End
QgsPoint center() const /HoldGIL/;
%Docstring
Returns the center point of the sphere.
.. seealso:: :py:func:`centerX`
.. seealso:: :py:func:`centerY`
.. seealso:: :py:func:`centerZ`
.. seealso:: :py:func:`setCenter`
%End
QgsVector3D centerVector() const /HoldGIL/;
%Docstring
Returns the vector to the center of the sphere.
.. seealso:: :py:func:`centerX`
.. seealso:: :py:func:`centerY`
.. seealso:: :py:func:`centerZ`
.. seealso:: :py:func:`setCenter`
%End
double centerX() const;
%Docstring
Returns the x-coordinate of the center of the sphere.
.. seealso:: :py:func:`center`
.. seealso:: :py:func:`centerY`
.. seealso:: :py:func:`centerZ`
.. seealso:: :py:func:`setCenter`
%End
double centerY() const;
%Docstring
Returns the y-coordinate of the center of the sphere.
.. seealso:: :py:func:`center`
.. seealso:: :py:func:`centerX`
.. seealso:: :py:func:`centerZ`
.. seealso:: :py:func:`setCenter`
%End
double centerZ() const;
%Docstring
Returns the z-coordinate of the center of the sphere.
.. seealso:: :py:func:`center`
.. seealso:: :py:func:`centerX`
.. seealso:: :py:func:`centerY`
.. seealso:: :py:func:`setCenter`
%End
void setCenter( const QgsPoint ¢er ) /HoldGIL/;
%Docstring
Sets the center point of the sphere.
.. seealso:: :py:func:`center`
%End
void setCenter( double x, double y, double z ) /HoldGIL/;
%Docstring
Sets the center point of the sphere to (``x``, ``y``, ``z``).
.. seealso:: :py:func:`center`
%End
double radius() const /HoldGIL/;
%Docstring
Returns the radius of the sphere.
.. seealso:: :py:func:`setRadius`
.. seealso:: :py:func:`diameter`
%End
void setRadius( double radius ) /HoldGIL/;
%Docstring
Sets the ``radius`` of the sphere.
.. seealso:: :py:func:`radius`
%End
double diameter() const /HoldGIL/;
%Docstring
Returns the diameter of the sphere.
.. seealso:: :py:func:`radius`
%End
double volume() const /HoldGIL/;
%Docstring
Returns the volume of the sphere.
%End
double surfaceArea() const /HoldGIL/;
%Docstring
Returns the surface area of the sphere.
%End
QgsCircle toCircle() const /HoldGIL/;
%Docstring
Converts the sphere to a 2-dimensional circle.
%End
QgsBox3D boundingBox() const /HoldGIL/;
%Docstring
Returns the 3-dimensional bounding box containing the sphere.
%End
SIP_PYOBJECT __repr__();
%MethodCode
QString str;
if ( sipCpp->isNull() )
{
str = QStringLiteral( "<QgsSphere: null>" ).arg( sipCpp->centerX() ).arg( sipCpp->centerY() ).arg( sipCpp->centerZ() ).arg( sipCpp->radius() );
}
else
{
str = QStringLiteral( "<QgsSphere: (%1, %2, %3) radius %4>" ).arg( sipCpp->centerX() ).arg( sipCpp->centerY() ).arg( sipCpp->centerZ() ).arg( sipCpp->radius() );
}
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgssphere.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|