2017-04-10 19:42:59 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-04-12 14:55:39 +10:00
|
|
|
* src/core/geometry/qgsbox3d.h *
|
2017-04-10 19:42:59 +10:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsBox3d
|
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A 3-dimensional box composed of x, y, z coordinates.
|
2017-04-10 19:42:59 +10:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
A box composed of x/y/z minimum and maximum values. It is often used to return the 3D
|
|
|
|
extent of a geometry or collection of geometries.
|
2017-04-10 19:42:59 +10:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:class:`QgsRectangle`
|
2018-05-28 11:31:08 -04:00
|
|
|
|
|
|
|
.. versionadded:: 3.0
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsbox3d.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
2017-04-19 15:43:39 +10:00
|
|
|
QgsBox3d( double xmin = 0, double ymin = 0, double zmin = 0, double xmax = 0, double ymax = 0, double zmax = 0 );
|
2017-04-10 19:42:59 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsBox3D which accepts the ranges of x/y/z coordinates.
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
QgsBox3d( const QgsPoint &p1, const QgsPoint &p2 );
|
2017-04-10 19:42:59 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructs a QgsBox3D from two points representing opposite corners of the box.
|
|
|
|
The box is normalized after construction.
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
2017-12-15 00:11:08 +01:00
|
|
|
QgsBox3d( const QgsRectangle &rect );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructs a QgsBox3D from a rectangle.
|
|
|
|
Z Minimum and Z Maximum are set to 0.0.
|
2017-12-15 00:11:08 +01:00
|
|
|
%End
|
|
|
|
|
2017-04-10 19:42:59 +10:00
|
|
|
void setXMinimum( double x );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the minimum ``x`` value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`xMinimum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setXMaximum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setXMaximum( double x );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the maximum ``x`` value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`xMaximum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setXMinimum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double xMinimum() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the minimum x value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setXMinimum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`xMaximum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double xMaximum() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the maximum x value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setXMaximum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`xMinimum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setYMinimum( double y );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the minimum ``y`` value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`yMinimum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setYMaximum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setYMaximum( double y );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the maximum ``y`` value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`yMaximum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setYMinimum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double yMinimum() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the minimum y value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setYMinimum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`yMaximum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double yMaximum() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the maximum y value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setYMaximum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`yMinimum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setZMinimum( double z );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the minimum ``z`` value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`zMinimum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setZMaximum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setZMaximum( double z );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the maximum ``z`` value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`zMaximum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setZMinimum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double zMinimum() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the minimum z value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setZMinimum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`zMaximum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double zMaximum() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the maximum z value.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setZMaximum`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`zMinimum`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void normalize();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Normalize the box so it has non-negative width/height/depth.
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double width() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the width of the box.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`height`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`depth`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double height() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the height of the box.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`width`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`depth`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double depth() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the depth of the box.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`width`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`height`
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
2017-04-12 14:45:47 +10:00
|
|
|
double volume() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the volume of the box.
|
2017-04-12 14:45:47 +10:00
|
|
|
%End
|
|
|
|
|
2017-04-10 19:42:59 +10:00
|
|
|
QgsBox3d intersect( const QgsBox3d &other ) const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the intersection of this box and another 3D box.
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
2017-04-19 15:43:39 +10:00
|
|
|
bool is2d() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns true if the box can be considered a 2-dimensional box, i.e.
|
|
|
|
it has equal minimum and maximum z values.
|
2017-04-19 15:43:39 +10:00
|
|
|
%End
|
|
|
|
|
2017-04-10 19:42:59 +10:00
|
|
|
bool intersects( const QgsBox3d &other ) const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns true if box intersects with another box.
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool contains( const QgsBox3d &other ) const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns true when box contains other box.
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
bool contains( const QgsPoint &point ) const;
|
2017-04-10 19:42:59 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns true when box contains a ``point``.
|
2017-04-11 15:35:32 +10:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
If the point is a 2D point (no z-coordinate), then the containment test
|
|
|
|
will be performed on the x/y extent of the box only.
|
2017-04-10 19:42:59 +10:00
|
|
|
%End
|
|
|
|
|
2017-04-12 14:45:47 +10:00
|
|
|
QgsRectangle toRectangle() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Converts the box to a 2D rectangle.
|
2017-04-12 14:45:47 +10:00
|
|
|
%End
|
|
|
|
|
2018-02-20 09:59:39 +10:00
|
|
|
bool operator==( const QgsBox3d &other ) const;
|
|
|
|
|
2017-04-10 19:42:59 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-04-12 14:55:39 +10:00
|
|
|
* src/core/geometry/qgsbox3d.h *
|
2017-04-10 19:42:59 +10:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|