|
QGIS API Documentation 3.99.0-Master (e9821da5c6b)
|
Defines configuration of how a vector layer gets tiled for 3D rendering. More...
#include <qgsabstractvectorlayer3drenderer.h>
Public Member Functions | |
| int | maximumChunkFeatures () const |
| Returns the maximum number of features that will be fetched in any chunk. | |
| void | readXml (const QDomElement &elem) |
| Reads content of the object from XML. | |
| void | setMaximumChunkFeatures (int value) |
| Sets the maximum number of features that will be fetched in any chunk. | |
| void | setShowBoundingBoxes (bool enabled) |
| Sets whether to display bounding boxes of entity's tiles (for debugging). | |
| Q_DECL_DEPRECATED void | setZoomLevelsCount (int count) |
| Sets number of zoom levels. | |
| bool | showBoundingBoxes () const |
| Returns whether to display bounding boxes of entity's tiles (for debugging). | |
| void | writeXml (QDomElement &elem) const |
| Writes content of the object to XML. | |
| Q_DECL_DEPRECATED int | zoomLevelsCount () const |
| Returns number of zoom levels. | |
Static Public Member Functions | |
| static double | maximumLeafExtent () |
| This is the maximum width or height a tile can have and still be considered a leaf node. | |
| static double | tileGeometryErrorRatio () |
| This is the ratio of tile's largest size to geometry error and is used when setting the root tile's error. | |
Defines configuration of how a vector layer gets tiled for 3D rendering.
Root node has the layer's extent and geometry error is set as a fraction of the extent (see maximumLeafExtent()) Child nodes are created using quadtree approach - a node gets four children, each having their width/height (2D extent) and geometry error halved.
For example a root tile that is 1'000 meters wide will get geometry error set as 10 meters.
When loading data for each tile, we fetch up to maximumChunkFeatures() features. If the limit is hit, we will recursively create children, so that user gets to see more features when zoomed in. If the geographical extent is very large (see maximumLeafExtent()), we would still recursively create children, even if the limit of features is not hit, to avoid jitter due to numerical precision issues.
Definition at line 43 of file qgsabstractvectorlayer3drenderer.h.
|
inline |
Returns the maximum number of features that will be fetched in any chunk.
If more features than the maximum belong to the chunk, further features will become available in child nodes. This is meant as a control for performance - fewer features mean faster load times, but user needs to zoom in more to see everything.
Definition at line 74 of file qgsabstractvectorlayer3drenderer.h.
|
inlinestatic |
This is the maximum width or height a tile can have and still be considered a leaf node.
Children will be generated for tiles larger than this, even if their chunks did not reach the maximumChunkFeatures limit. We want to avoid having huge leaf nodes so we don't have float precision issues
Definition at line 105 of file qgsabstractvectorlayer3drenderer.h.
| void QgsVectorLayer3DTilingSettings::readXml | ( | const QDomElement & | elem | ) |
Reads content of the object from XML.
Definition at line 35 of file qgsabstractvectorlayer3drenderer.cpp.
|
inline |
Sets the maximum number of features that will be fetched in any chunk.
If more features than the maximum belong to the chunk, further features will become available in child nodes. This is meant as a control for performance - fewer features mean faster load times, but user needs to zoom in more to see everything.
Definition at line 83 of file qgsabstractvectorlayer3drenderer.h.
|
inline |
Sets whether to display bounding boxes of entity's tiles (for debugging).
Definition at line 63 of file qgsabstractvectorlayer3drenderer.h.
|
inline |
Sets number of zoom levels.
See zoomLevelsCount() documentation for more details.
Definition at line 60 of file qgsabstractvectorlayer3drenderer.h.
|
inline |
Returns whether to display bounding boxes of entity's tiles (for debugging).
Definition at line 65 of file qgsabstractvectorlayer3drenderer.h.
|
inlinestatic |
This is the ratio of tile's largest size to geometry error and is used when setting the root tile's error.
The choice of 1/100 was relatively arbitrary and based on test data.
Definition at line 96 of file qgsabstractvectorlayer3drenderer.h.
| void QgsVectorLayer3DTilingSettings::writeXml | ( | QDomElement & | elem | ) | const |
Writes content of the object to XML.
Definition at line 24 of file qgsabstractvectorlayer3drenderer.cpp.
|
inline |
Returns number of zoom levels.
One zoom level means there will be one tile. Every extra zoom level multiplies number of tiles by four. For example, three zoom levels will produce 16 tiles at the highest zoom level. It is therefore recommended to keep the number of zoom levels low to prevent excessive number of tiles.
Definition at line 54 of file qgsabstractvectorlayer3drenderer.h.