44 QGeoTiledMapRootNode()
45 : isTextureLinear(
false)
46 , geometry(QSGGeometry::defaultAttributes_Point2D(), 4)
47 , root(
new QSGTransformNode())
48 , tiles(
new QGeoTiledMapTileContainerNode())
49 , wrapLeft(
new QGeoTiledMapTileContainerNode())
50 , wrapRight(
new QGeoTiledMapTileContainerNode())
52 setIsRectangular(
true);
53 setGeometry(&geometry);
54 root->appendChildNode(tiles);
55 root->appendChildNode(wrapLeft);
56 root->appendChildNode(wrapRight);
57 appendChildNode(root);
60 ~QGeoTiledMapRootNode()
65 void setClipRect(
const QRect &rect)
67 if (rect != clipRect) {
68 QSGGeometry::updateRectGeometry(&geometry, rect);
69 QSGClipNode::setClipRect(rect);
71 markDirty(DirtyGeometry);
75 void updateTiles(QGeoTiledMapTileContainerNode *root,
76 QGeoTiledMapScenePrivate *d,
78 QQuickWindow *window);
85 QSGTransformNode *root;
87 QGeoTiledMapTileContainerNode *tiles;
88 QGeoTiledMapTileContainerNode *wrapLeft;
89 QGeoTiledMapTileContainerNode *wrapRight;
91 QHash<QGeoTileSpec, QSGTexture *> textures;
93#ifdef QT_LOCATION_DEBUG
94 double m_sideLengthPixel;
95 QMap<
double, QList<QGeoTileSpec>> m_droppedTiles;
101 Q_DECLARE_PUBLIC(QGeoTiledMapScene)
103 QGeoTiledMapScenePrivate();
104 ~QGeoTiledMapScenePrivate();
106 void addTile(
const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture);
108 void setVisibleTiles(
const QSet<QGeoTileSpec> &visibleTiles);
109 void removeTiles(
const QSet<QGeoTileSpec> &oldTiles);
110 bool buildGeometry(
const QGeoTileSpec &spec, QSGImageNode *imageNode,
bool &overzooming);
111 void updateTileBounds(
const QSet<QGeoTileSpec> &tiles);
113 inline bool isTiltedOrRotated()
const {
return (m_cameraData.tilt() > 0.0) || (m_cameraData.bearing() > 0.0); }
119 QGeoCameraData m_cameraData;
120 QRectF m_visibleArea;
121 QSet<QGeoTileSpec> m_visibleTiles;
123 QDoubleVector3D m_cameraUp;
124 QDoubleVector3D m_cameraEye;
125 QDoubleVector3D m_cameraCenter;
126 QMatrix4x4 m_projectionMatrix;
130 double m_scaleFactor =
131#ifdef QT_LOCATION_DEBUG
138 int m_intZoomLevel = 0;
143 int m_sideLength = 0;
145 QHash<QGeoTileSpec, QSharedPointer<QGeoTileTexture> > m_textures;
146 QList<QGeoTileSpec> m_updatedTextures;
153 int m_tileXWrapsBelow = 0;
154 bool m_linearScaling =
false;
155 bool m_dropTextures =
false;
157#ifdef QT_LOCATION_DEBUG
158 double m_sideLengthPixel;
159 QGeoTiledMapRootNode *m_mapRoot =
nullptr;