54 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(),
55 double xmax = std::numeric_limits<double>::quiet_NaN(),
double ymax = std::numeric_limits<double>::quiet_NaN(),
double zmax = std::numeric_limits<double>::quiet_NaN(),
56 bool normalize =
true );
70 double zMin = std::numeric_limits<double>::quiet_NaN(),
double zMax = std::numeric_limits<double>::quiet_NaN(),
71 bool normalize =
true );
73 QgsBox3D( SIP_PYOBJECT x
SIP_TYPEHINT( Optional[Union[
QgsPoint,
QgsRectangle,
float]] ) = Py_None, SIP_PYOBJECT y
SIP_TYPEHINT( Optional[
QgsPoint,
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 )];
75 if ( sipCanConvertToType( a0, sipType_QgsRectangle, SIP_NOT_NONE ) && a4 == Py_None && a5 == Py_None && a6 == Py_None )
80 QgsRectangle *p =
reinterpret_cast<QgsRectangle *
>( sipConvertToType( a0, sipType_QgsRectangle, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
83 sipReleaseType( p, sipType_QgsRectangle, state );
87 double z1 = a1 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a1 );
88 double z2 = a2 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a2 );
89 bool n = a3 == Py_None ? true : PyObject_IsTrue( a3 );
91 sipCpp =
new QgsBox3D( *p, z1, z2, n );
94 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 )
99 QgsPoint *pt1 =
reinterpret_cast<QgsPoint *
>( sipConvertToType( a0, sipType_QgsPoint, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
102 sipReleaseType( pt1, sipType_QgsPoint, state );
106 QgsPoint *pt2 =
reinterpret_cast<QgsPoint *
>( sipConvertToType( a1, sipType_QgsPoint, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
109 sipReleaseType( pt2, sipType_QgsPoint, state );
113 bool n = a2 == Py_None ? true : PyObject_IsTrue( a2 );
114 sipCpp =
new QgsBox3D( *pt1, *pt2, n );
119 ( a0 == Py_None || PyFloat_AsDouble( a0 ) != -1.0 || !PyErr_Occurred() ) &&
120 ( a1 == Py_None || PyFloat_AsDouble( a1 ) != -1.0 || !PyErr_Occurred() ) &&
121 ( a2 == Py_None || PyFloat_AsDouble( a2 ) != -1.0 || !PyErr_Occurred() ) &&
122 ( a3 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) &&
123 ( a4 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) &&
124 ( a5 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) &&
125 ( a6 == Py_None || PyFloat_AsDouble( a3 ) != -1.0 || !PyErr_Occurred() ) )
127 double x1 = a0 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a0 );
128 double y1 = a1 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a1 );
129 double z1 = a2 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a2 );
130 double x2 = a3 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a3 );
131 double y2 = a4 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a4 );
132 double z2 = a5 == Py_None ? std::numeric_limits<double>::quiet_NaN() : PyFloat_AsDouble( a5 );
133 bool n = a6 == Py_None ? true : PyObject_IsTrue( a6 );
134 sipCpp =
new QgsBox3D( x1, y1, z1, x2, y2, z2, n );
138 PyErr_SetString( PyExc_TypeError, QStringLiteral(
"Invalid type in constructor arguments." ).toUtf8().constData() );
271 double volume() const
SIP_HOLDGIL {
return mBounds2d.area() * ( mZmax - mZmin ); }
320 bool contains(
double x,
double y,
double z ) const
SIP_HOLDGIL;
334 void combineWith(
double x,
double y,
double z )
SIP_HOLDGIL;
347 double distanceTo(
const QVector3D &point )
const SIP_HOLDGIL;
365 void scale(
double scaleFactor,
double centerX,
double centerY,
double centerZ )
SIP_HOLDGIL;
428 SIP_PYOBJECT __repr__();
430 QString
str = QStringLiteral(
"<QgsBox3D(%1, %2, %3, %4, %5, %6)>" )
431 .arg( sipCpp->xMinimum() )
432 .arg( sipCpp->yMinimum() )
433 .arg( sipCpp->zMinimum() )
434 .arg( sipCpp->xMaximum() )
435 .arg( sipCpp->yMaximum() )
436 .arg( sipCpp->zMaximum() );
437 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
444 double mZmin = std::numeric_limits<double>::quiet_NaN();
445 double mZmax = std::numeric_limits<double>::quiet_NaN();