43 QGeoTiledMapRootNode()
44 : isTextureLinear(
false)
45 , geometry(QSGGeometry::defaultAttributes_Point2D(), 4)
46 , root(
new QSGTransformNode())
47 , tiles(
new QGeoTiledMapTileContainerNode())
48 , wrapLeft(
new QGeoTiledMapTileContainerNode())
49 , wrapRight(
new QGeoTiledMapTileContainerNode())
51 setIsRectangular(
true);
52 setGeometry(&geometry);
53 root->appendChildNode(tiles);
54 root->appendChildNode(wrapLeft);
55 root->appendChildNode(wrapRight);
56 appendChildNode(root);
59 ~QGeoTiledMapRootNode()
64 void setClipRect(
const QRect &rect)
66 if (rect != clipRect) {
67 QSGGeometry::updateRectGeometry(&geometry, rect);
68 QSGClipNode::setClipRect(rect);
70 markDirty(DirtyGeometry);
74 void updateTiles(QGeoTiledMapTileContainerNode *root,
75 QGeoTiledMapScenePrivate *d,
77 QQuickWindow *window);
84 QSGTransformNode *root;
86 QGeoTiledMapTileContainerNode *tiles;
87 QGeoTiledMapTileContainerNode *wrapLeft;
88 QGeoTiledMapTileContainerNode *wrapRight;
90 QHash<QGeoTileSpec, QSGTexture *> textures;
92#ifdef QT_LOCATION_DEBUG
93 double m_sideLengthPixel;
94 QMap<
double, QList<QGeoTileSpec>> m_droppedTiles;
100 Q_DECLARE_PUBLIC(QGeoTiledMapScene)
102 QGeoTiledMapScenePrivate();
103 ~QGeoTiledMapScenePrivate();
105 void addTile(
const QGeoTileSpec &spec, QSharedPointer<QGeoTileTexture> texture);
107 void setVisibleTiles(
const QSet<QGeoTileSpec> &visibleTiles);
108 void removeTiles(
const QSet<QGeoTileSpec> &oldTiles);
109 bool buildGeometry(
const QGeoTileSpec &spec, QSGImageNode *imageNode,
bool &overzooming);
110 void updateTileBounds(
const QSet<QGeoTileSpec> &tiles);
112 inline bool isTiltedOrRotated()
const {
return (m_cameraData.tilt() > 0.0) || (m_cameraData.bearing() > 0.0); }
118 QGeoCameraData m_cameraData;
119 QRectF m_visibleArea;
120 QSet<QGeoTileSpec> m_visibleTiles;
122 QDoubleVector3D m_cameraUp;
123 QDoubleVector3D m_cameraEye;
124 QDoubleVector3D m_cameraCenter;
125 QMatrix4x4 m_projectionMatrix;
129 double m_scaleFactor =
130#ifdef QT_LOCATION_DEBUG
137 int m_intZoomLevel = 0;
142 int m_sideLength = 0;
144 QHash<QGeoTileSpec, QSharedPointer<QGeoTileTexture> > m_textures;
145 QList<QGeoTileSpec> m_updatedTextures;
152 int m_tileXWrapsBelow = 0;
153 bool m_linearScaling =
false;
154 bool m_dropTextures =
false;
156#ifdef QT_LOCATION_DEBUG
157 double m_sideLengthPixel;
158 QGeoTiledMapRootNode *m_mapRoot =
nullptr;