237 lines
5.1 KiB
Plaintext
Raw Normal View History

2017-04-10 19:42:59 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* 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:
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
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
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.
%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.
.. seealso:: :py:func:`xMinimum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`xMaximum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`setXMinimum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`setXMaximum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`yMinimum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`yMaximum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`setYMinimum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`setYMaximum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`zMinimum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`zMaximum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`setZMinimum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`setZMaximum`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`height`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`width`
2017-12-15 10:36:55 -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.
.. seealso:: :py:func:`width`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`height`
2017-04-10 19:42:59 +10:00
%End
double volume() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the volume of the box.
%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
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.
%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
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
QgsRectangle toRectangle() const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts the box to a 2D rectangle.
%End
bool operator==( const QgsBox3d &other ) const;
2017-04-10 19:42:59 +10:00
};
/************************************************************************
* This file has been generated automatically from *
* *
* 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 *
************************************************************************/