/
qgspointcloudrenderer.sip.in
358 lines (246 loc) · 9.84 KB
/
qgspointcloudrenderer.sip.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointcloudrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPointCloudRenderContext
{
%Docstring
Encapsulates the render context for a 2D point cloud rendering operation.
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgspointcloudrenderer.h"
%End
public:
QgsPointCloudRenderContext( QgsRenderContext &context, const QgsVector3D &scale, const QgsVector3D &offset );
%Docstring
Constructor for QgsPointCloudRenderContext.
The ``scale`` and ``offset`` arguments specify the scale and offset of the layer's int32 coordinates
compared to CRS coordinates respectively.
%End
QgsRenderContext &renderContext();
%Docstring
Returns a reference to the context's render context.
%End
QgsVector3D scale() const;
%Docstring
Returns the scale of the layer's int32 coordinates compared to CRS coords.
%End
QgsVector3D offset() const;
%Docstring
Returns the offset of the layer's int32 coordinates compared to CRS coords.
%End
long pointsRendered() const;
%Docstring
Returns the total number of points rendered.
%End
void incrementPointsRendered( long count );
%Docstring
Increments the count of points rendered by the specified amount.
It is a point cloud renderer's responsibility to correctly call this after
rendering a block of points.
%End
QgsPointCloudAttributeCollection attributes() const;
%Docstring
Returns the attributes associated with the rendered block.
.. seealso:: :py:func:`setAttributes`
%End
void setAttributes( const QgsPointCloudAttributeCollection &attributes );
%Docstring
Sets the ``attributes`` associated with the rendered block.
.. seealso:: :py:func:`attributes`
%End
int pointRecordSize() const;
%Docstring
Returns the size of a single point record.
%End
int xOffset() const;
%Docstring
Returns the offset for the x value in a point record.
.. seealso:: :py:func:`yOffset`
%End
int yOffset() const;
%Docstring
Returns the offset for the y value in a point record.
.. seealso:: :py:func:`xOffset`
%End
private:
QgsPointCloudRenderContext( const QgsPointCloudRenderContext &rh );
};
class QgsPointCloudRenderer
{
%Docstring
Abstract base class for 2d point cloud renderers.
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgspointcloudrenderer.h"
%End
%ConvertToSubClassCode
const QString type = sipCpp->type();
if ( type == QLatin1String( "rgb" ) )
sipType = sipType_QgsPointCloudRgbRenderer;
else
sipType = 0;
%End
public:
QgsPointCloudRenderer();
%Docstring
Constructor for QgsPointCloudRenderer.
%End
virtual ~QgsPointCloudRenderer();
virtual QString type() const = 0;
%Docstring
Returns the identifier of the renderer type.
%End
virtual QgsPointCloudRenderer *clone() const = 0 /Factory/;
%Docstring
Create a deep copy of this renderer. Should be implemented by all subclasses
and generate a proper subclass.
%End
virtual void renderBlock( const QgsPointCloudBlock *block, QgsPointCloudRenderContext &context ) = 0;
%Docstring
Renders a ``block`` of point cloud data using the specified render ``context``.
%End
static QgsPointCloudRenderer *load( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Creates a renderer from an XML ``element``.
Caller takes ownership of the returned renderer.
.. seealso:: :py:func:`save`
%End
virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const = 0;
%Docstring
Saves the renderer configuration to an XML element.
.. seealso:: :py:func:`load`
%End
virtual QSet< QString > usedAttributes( const QgsPointCloudRenderContext &context ) const;
%Docstring
Returns a list of attributes required by this renderer. Attributes not listed in here may
not be requested from the provider at rendering time.
.. note::
the "X" and "Y" attributes will always be fetched and do not need to be explicitly
returned here.
%End
virtual void startRender( QgsPointCloudRenderContext &context );
%Docstring
Must be called when a new render cycle is started. A call to :py:func:`~QgsPointCloudRenderer.startRender` must always
be followed by a corresponding call to :py:func:`~QgsPointCloudRenderer.stopRender` after all features have been rendered.
.. seealso:: :py:func:`stopRender`
.. warning::
This method is not thread safe. Before calling :py:func:`~QgsPointCloudRenderer.startRender` in a non-main thread,
the renderer should instead be cloned and :py:func:`~QgsPointCloudRenderer.startRender`/:py:func:`~QgsPointCloudRenderer.stopRender` called on the clone.
%End
virtual void stopRender( QgsPointCloudRenderContext &context );
%Docstring
Must be called when a render cycle has finished, to allow the renderer to clean up.
Calls to :py:func:`~QgsPointCloudRenderer.stopRender` must always be preceded by a call to :py:func:`~QgsPointCloudRenderer.startRender`.
.. warning::
This method is not thread safe. Before calling :py:func:`~QgsPointCloudRenderer.startRender` in a non-main thread,
the renderer should instead be cloned and :py:func:`~QgsPointCloudRenderer.startRender`/:py:func:`~QgsPointCloudRenderer.stopRender` called on the clone.
.. seealso:: :py:func:`startRender`
%End
void setPointSize( double size );
%Docstring
Sets the point ``size``. Point size units are specified via :py:func:`~QgsPointCloudRenderer.setPointSizeUnit`.
.. seealso:: :py:func:`pointSize`
.. seealso:: :py:func:`setPointSizeUnit`
.. seealso:: :py:func:`setPointSizeMapUnitScale`
%End
double pointSize() const;
%Docstring
Returns the point size.
The point size units are retrieved by calling :py:func:`~QgsPointCloudRenderer.pointSizeUnit`.
.. seealso:: :py:func:`setPointSize`
.. seealso:: :py:func:`pointSizeUnit`
.. seealso:: :py:func:`pointSizeMapUnitScale`
%End
void setPointSizeUnit( const QgsUnitTypes::RenderUnit units );
%Docstring
Sets the ``units`` used for the point size.
.. seealso:: :py:func:`setPointSize`
.. seealso:: :py:func:`pointSizeUnit`
.. seealso:: :py:func:`setPointSizeMapUnitScale`
%End
QgsUnitTypes::RenderUnit pointSizeUnit() const;
%Docstring
Returns the units used for the point size.
.. seealso:: :py:func:`setPointSizeUnit`
.. seealso:: :py:func:`pointSize`
.. seealso:: :py:func:`pointSizeMapUnitScale`
%End
void setPointSizeMapUnitScale( const QgsMapUnitScale &scale );
%Docstring
Sets the map unit ``scale`` used for the point size.
.. seealso:: :py:func:`pointSizeMapUnitScale`
.. seealso:: :py:func:`setPointSize`
.. seealso:: :py:func:`setPointSizeUnit`
%End
const QgsMapUnitScale &pointSizeMapUnitScale() const;
%Docstring
Returns the map unit scale used for the point size.
.. seealso:: :py:func:`setPointSizeMapUnitScale`
.. seealso:: :py:func:`pointSizeUnit`
.. seealso:: :py:func:`pointSize`
%End
double maximumScreenError() const;
%Docstring
Returns the maximum screen error allowed when rendering the point cloud.
Larger values result in a faster render with less points rendered.
Units are retrieved via :py:func:`~QgsPointCloudRenderer.maximumScreenErrorUnit`.
.. seealso:: :py:func:`setMaximumScreenError`
.. seealso:: :py:func:`maximumScreenErrorUnit`
%End
void setMaximumScreenError( double error );
%Docstring
Sets the maximum screen ``error`` allowed when rendering the point cloud.
Larger values result in a faster render with less points rendered.
Units are set via :py:func:`~QgsPointCloudRenderer.setMaximumScreenErrorUnit`.
.. seealso:: :py:func:`maximumScreenError`
.. seealso:: :py:func:`setMaximumScreenErrorUnit`
%End
QgsUnitTypes::RenderUnit maximumScreenErrorUnit() const;
%Docstring
Returns the unit for the maximum screen error allowed when rendering the point cloud.
.. seealso:: :py:func:`maximumScreenError`
.. seealso:: :py:func:`setMaximumScreenErrorUnit`
%End
void setMaximumScreenErrorUnit( QgsUnitTypes::RenderUnit unit );
%Docstring
Sets the ``unit`` for the maximum screen error allowed when rendering the point cloud.
.. seealso:: :py:func:`setMaximumScreenError`
.. seealso:: :py:func:`maximumScreenErrorUnit`
%End
protected:
static void pointXY( QgsPointCloudRenderContext &context, const char *ptr, int i, double &x, double &y );
%Docstring
Retrieves the x and y coordinate for the point at index ``i``.
%End
void copyCommonProperties( QgsPointCloudRenderer *destination ) const;
%Docstring
Copies common point cloud properties (such as point size and screen error) to the ``destination`` renderer.
%End
void restoreCommonProperties( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Restores common renderer properties (such as point size and screen error) from the
specified DOM ``element``.
.. seealso:: :py:func:`saveCommonProperties`
%End
void saveCommonProperties( QDomElement &element, const QgsReadWriteContext &context ) const;
%Docstring
Saves common renderer properties (such as point size and screen error) to the
specified DOM ``element``.
.. seealso:: :py:func:`restoreCommonProperties`
%End
private:
QgsPointCloudRenderer( const QgsPointCloudRenderer &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointcloudrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/