53 QgsBox3D(
double xmin = std::numeric_limits<double>::quiet_NaN(),
double ymin = std::numeric_limits<double>::quiet_NaN(),
double zmin = std::numeric_limits<double>::quiet_NaN(),
54 double xmax = std::numeric_limits<double>::quiet_NaN(),
double ymax = std::numeric_limits<double>::quiet_NaN(),
double zmax = std::numeric_limits<double>::quiet_NaN(),
55 bool normalize =
true );
77 double zMin = std::numeric_limits<double>::quiet_NaN(),
double zMax = std::numeric_limits<double>::quiet_NaN(),
78 bool normalize =
true );
81 QgsBox3D( SIP_PYOBJECT x
SIP_TYPEHINT( Optional[Union[
QgsPoint,
QgsVector3D,
QgsRectangle,
float]] ) = Py_None, SIP_PYOBJECT y
SIP_TYPEHINT( Optional[
QgsPoint,
QgsVector3D,
float] ) = Py_None, SIP_PYOBJECT z
SIP_TYPEHINT( Optional[Union[
bool,
float]] ) = Py_None, SIP_PYOBJECT x2
SIP_TYPEHINT( Optional[Union[
bool,
float]] ) = Py_None, SIP_PYOBJECT y2
SIP_TYPEHINT( Optional[
float] ) = Py_None, SIP_PYOBJECT z2
SIP_TYPEHINT( Optional[
float] ) = Py_None, SIP_PYOBJECT n
SIP_TYPEHINT( Optional[
bool] ) = Py_None ) [(
double x = 0.0,
double y = 0.0,
double z = 0.0,
double x2 = 0.0,
double y2 = 0.0,
double z2 = 0.0,
bool n = true )];
83 if ( sipCanConvertToType( a0, sipType_QgsRectangle, SIP_NOT_NONE ) && a4 == Py_None && a5 == Py_None && a6 == Py_None )
88 QgsRectangle *p =
reinterpret_cast<QgsRectangle *
>( sipConvertToType( a0, sipType_QgsRectangle, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
91 sipReleaseType( p, sipType_QgsRectangle, state );
95 double z1 = a1 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a1 );
96 double z2 = a2 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a2 );
97 bool n = a3 == Py_None ? true : PyObject_IsTrue( a3 );
99 sipCpp =
new QgsBox3D( *p, z1, z2, n );
102 else if ( sipCanConvertToType( a0, sipType_QgsPoint, SIP_NOT_NONE ) && sipCanConvertToType( a1, sipType_QgsPoint, SIP_NOT_NONE ) && a3 == Py_None && a4 == Py_None && a5 == Py_None && a6 == Py_None )
107 QgsPoint *pt1 =
reinterpret_cast<QgsPoint *
>( sipConvertToType( a0, sipType_QgsPoint, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
110 sipReleaseType( pt1, sipType_QgsPoint, state );
114 QgsPoint *pt2 =
reinterpret_cast<QgsPoint *
>( sipConvertToType( a1, sipType_QgsPoint, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
117 sipReleaseType( pt2, sipType_QgsPoint, state );
121 bool n = a2 == Py_None ? true : PyObject_IsTrue( a2 );
122 sipCpp =
new QgsBox3D( *pt1, *pt2, n );
126 else if ( sipCanConvertToType( a0, sipType_QgsVector3D, SIP_NOT_NONE ) && sipCanConvertToType( a1, sipType_QgsVector3D, SIP_NOT_NONE ) && a3 == Py_None && a4 == Py_None && a5 == Py_None && a6 == Py_None )
131 QgsVector3D *corner1 =
reinterpret_cast<QgsVector3D *
>( sipConvertToType( a0, sipType_QgsVector3D, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
134 sipReleaseType( corner1, sipType_QgsVector3D, state );
138 QgsVector3D *corner2 =
reinterpret_cast<QgsVector3D *
>( sipConvertToType( a1, sipType_QgsVector3D, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
141 sipReleaseType( corner2, sipType_QgsVector3D, state );
145 bool n = a2 == Py_None ? true : PyObject_IsTrue( a2 );
146 sipCpp =
new QgsBox3D( *corner1, *corner2, n );
151 ( a0 == Py_None || PyFloat_AsDouble( a0 ) != -1.0 || !PyErr_Occurred() ) &&
152 ( a1 == Py_None || PyFloat_AsDouble( a1 ) != -1.0 || !PyErr_Occurred() ) &&
153 ( a2 == Py_None || PyFloat_AsDouble( a2 ) != -1.0 || !PyErr_Occurred() ) &&
154 ( a3 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) &&
155 ( a4 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) &&
156 ( a5 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) &&
157 ( a6 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) )
159 double x1 = a0 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a0 );
160 double y1 = a1 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a1 );
161 double z1 = a2 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a2 );
162 double x2 = a3 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a3 );
163 double y2 = a4 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a4 );
164 double z2 = a5 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a5 );
165 bool n = a6 == Py_None ? true : PyObject_IsTrue( a6 );
166 sipCpp =
new QgsBox3D( x1, y1, z1, x2, y2, z2, n );
170 PyErr_SetString( PyExc_TypeError, QStringLiteral(
"Invalid type in constructor arguments." ).toUtf8().constData() );
181 void set(
double xMin,
double yMin,
double zMin,
double xMax,
double yMax,
double zMax,
bool normalize =
true )
183 mBounds2d.set( xMin, yMin, xMax, yMax,
false );
375 bool contains(
double x,
double y,
double z ) const
SIP_HOLDGIL;
389 void combineWith(
double x,
double y,
double z )
SIP_HOLDGIL;
402 double distanceTo(
const QVector3D &point )
const SIP_HOLDGIL;
420 void scale(
double scaleFactor,
double centerX,
double centerY,
double centerZ )
SIP_HOLDGIL;
426 void grow(
double delta );
489 SIP_PYOBJECT __repr__();
491 QString str = QStringLiteral(
"<QgsBox3D(%1, %2, %3, %4, %5, %6)>" )
492 .arg( sipCpp->xMinimum() )
493 .arg( sipCpp->yMinimum() )
494 .arg( sipCpp->zMinimum() )
495 .arg( sipCpp->xMaximum() )
496 .arg( sipCpp->yMaximum() )
497 .arg( sipCpp->zMaximum() );
498 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
505 double mZmin = std::numeric_limits<double>::quiet_NaN();
506 double mZmax = std::numeric_limits<double>::quiet_NaN();