2018-04-06 16:11:50 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/mesh/qgsmeshdataprovider.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef QgsPoint QgsMeshVertex; //xyz coords of vertex
|
2018-04-19 16:42:01 +02:00
|
|
|
typedef QVector<int> QgsMeshFace; //list of vertex indexes
|
2018-04-06 16:11:50 +02:00
|
|
|
|
|
|
|
class QgsMeshSource /Abstract/
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Mesh is a collection of vertices and faces in 2D or 3D space
|
|
|
|
- vertex - XY(Z) point (in the mesh's coordinate reference system)
|
|
|
|
- faces - sets of vertices forming a closed shape - typically triangles or quadrilaterals
|
|
|
|
|
|
|
|
Base on the underlying data provider/format, whole mesh is either stored in memory or
|
|
|
|
read on demand
|
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmeshdataprovider.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
virtual ~QgsMeshSource();
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual int vertexCount() const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
2018-04-19 16:42:01 +02:00
|
|
|
Return number of vertices in the native mesh
|
2018-04-06 16:11:50 +02:00
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
:return: Number of vertices in the mesh
|
2018-04-06 16:11:50 +02:00
|
|
|
%End
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual int faceCount() const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
|
|
|
Return number of faces in the native mesh
|
|
|
|
|
|
|
|
:return: Number of faces in the mesh
|
|
|
|
%End
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual QgsMeshVertex vertex( int index ) const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
|
|
|
Factory for mesh vertex with index
|
|
|
|
|
|
|
|
:return: new mesh vertex on index
|
|
|
|
%End
|
|
|
|
|
2018-04-19 16:42:01 +02:00
|
|
|
virtual QgsMeshFace face( int index ) const = 0;
|
2018-04-06 16:11:50 +02:00
|
|
|
%Docstring
|
|
|
|
Factory for mesh face with index
|
|
|
|
|
|
|
|
:return: new mesh face on index
|
|
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
|
|
class QgsMeshDataProvider: QgsDataProvider, QgsMeshSource
|
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Base class for providing data for :py:class:`QgsMeshLayer`
|
|
|
|
|
|
|
|
Responsible for reading native mesh data
|
|
|
|
|
|
|
|
.. seealso:: :py:class:`QgsMeshSource`
|
2018-04-20 09:38:39 +02:00
|
|
|
|
|
|
|
.. versionadded:: 3.2
|
2018-04-06 16:11:50 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmeshdataprovider.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
QgsMeshDataProvider( const QString &uri = QString() );
|
|
|
|
%Docstring
|
|
|
|
Ctor
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual QgsRectangle extent() const;
|
|
|
|
%Docstring
|
|
|
|
Returns the extent of the layer
|
|
|
|
|
|
|
|
:return: QgsRectangle containing the extent of the layer
|
|
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/mesh/qgsmeshdataprovider.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|