QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgstiledscenetile.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstiledscenetile.h
3 --------------------
4 begin : June 2023
5 copyright : (C) 2023 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ******************************************************************
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#ifndef QGSTILEDSCENETILE_H
20#define QGSTILEDSCENETILE_H
21
22#include "qgis_core.h"
23#include "qgis.h"
24#include "qgsmatrix4x4.h"
26
27#include <QUrl>
28
35class CORE_EXPORT QgsTiledSceneTile
36{
37 public:
38
45
51 explicit QgsTiledSceneTile( long long id );
52
54
56 QgsTiledSceneTile &operator=( const QgsTiledSceneTile &other );
57
61 bool isValid() const { return mId >= 0; }
62
66 long long id() const { return mId; }
67
76 Qgis::TileRefinementProcess refinementProcess() const { return mRefinementProcess; }
77
86 void setRefinementProcess( Qgis::TileRefinementProcess process );
87
93 void setBoundingVolume( const QgsTiledSceneBoundingVolume &volume );
94
100 const QgsTiledSceneBoundingVolume &boundingVolume() const;
101
107 void setTransform( const QgsMatrix4x4 &transform );
108
117 const QgsMatrix4x4 *transform() const { return mTransform.get(); }
118
124 QVariantMap resources() const;
125
131 void setResources( const QVariantMap &resources );
132
139 double geometricError() const { return mGeometricError; }
140
147 void setGeometricError( double error );
148
155 QUrl baseUrl() const;
156
163 void setBaseUrl( const QUrl &baseUrl );
164
170 QVariantMap metadata() const;
171
177 void setMetadata( const QVariantMap &metadata );
178
179 private:
180 long long mId = -1;
182 QgsTiledSceneBoundingVolume mBoundingVolume;
183 std::unique_ptr< QgsMatrix4x4 > mTransform;
184 QVariantMap mResources;
185 double mGeometricError = 0;
186 QUrl mBaseUrl;
187 QVariantMap mMetadata;
188
189};
190
191#endif // QGSTILEDSCENETILE_H
TileRefinementProcess
Tiled scene tile refinement processes.
Definition qgis.h:5317
@ Replacement
When tile is refined then its children should be used in place of itself.
A simple 4x4 matrix implementation useful for transformation in 3D space.
Represents a bounding volume for a tiled scene.
Represents an individual tile from a tiled scene data source.
bool isValid() const
Returns true if the tile is a valid tile (i.e.
Qgis::TileRefinementProcess refinementProcess() const
Returns the tile's refinement process.
long long id() const
Returns the tile's unique ID.
const QgsMatrix4x4 * transform() const
Returns the tile's transform.
double geometricError() const
Returns the tile's geometric error, which is the error, in meters, of the tile's simplified represent...