18#ifndef QGSTILEDSCENELAYERRENDERER_H
19#define QGSTILEDSCENELAYERRENDERER_H
29#include <QElapsedTimer>
89 void renderPrimitive(
const tinygltf::Model &model,
90 const tinygltf::Primitive &primitive,
93 const QMatrix4x4 *gltfLocalTransform,
94 const QString &contentUri,
97 void renderTrianglePrimitive(
const tinygltf::Model &model,
98 const tinygltf::Primitive &primitive,
101 const QMatrix4x4 *gltfLocalTransform,
102 const QString &contentUri,
105 void renderLinePrimitive(
const tinygltf::Model &model,
106 const tinygltf::Primitive &primitive,
109 const QMatrix4x4 *gltfLocalTransform,
110 const QString &contentUri,
115 std::unique_ptr< QgsTiledSceneRenderer > mRenderer;
116 bool mRenderTileBorders =
false;
118 QList< QgsMapClippingRegion > mClippingRegions;
127 enum class PrimitiveType
136 QPolygonF coordinates;
138 QPair< int, int > textureId { -1, -1 };
139 float textureCoords[6];
142 QVector< PrimitiveData > mPrimitiveData;
144 int mCurrentModelId = 0;
145 QHash< QPair< int, int >, QImage > mTextures;
150 bool hasContent =
false;
153 QVector< TileDetails > mTileDetails;
155 std::unique_ptr<QgsFeedback> mFeedback;
156 QSet< int > mWarnedPrimitiveTypes;
158 QElapsedTimer mElapsedTimer;
160 bool mEnableProfile =
false;
161 quint64 mPreparationTime = 0;
QFlags< MapLayerRendererFlag > MapLayerRendererFlags
Flags which control how map layer renderers behave.
Represents a coordinate reference system (CRS).
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A map clipping region (in map coordinates and CRS).
virtual bool render()=0
Do the rendering (based on data stored in the class).
virtual bool forceRasterRender() const
Returns true if the renderer must be rendered to a raster paint device (e.g.
virtual Qgis::MapLayerRendererFlags flags() const
Returns flags which control how the map layer rendering behaves.
QgsMapLayerRenderer(const QString &layerID, QgsRenderContext *context=nullptr)
Constructor for QgsMapLayerRenderer, with the associated layerID and render context.
Contains information about the context of a rendering operation.
Represents a bounding volume for a tiled scene.
An index for tiled scene data providers.
QgsTiledSceneLayerRenderer(QgsTiledSceneLayer *layer, QgsRenderContext &context)
Ctor.
QgsFeedback * feedback() const override
Access to feedback object of the layer renderer (may be nullptr).
~QgsTiledSceneLayerRenderer() override
Represents a map layer supporting display of tiled scene objects.
Encapsulates the render context for a 2D tiled scene rendering operation.
Abstract base class for 2d tiled scene renderers.
Tiled scene data request.
Represents an individual tile from a tiled scene data source.
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...