QGIS API Documentation 3.38.0-Grenoble (exported)
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
58 QgsTiledSceneTile &operator=( const QgsTiledSceneTile &other );
59
63 bool isValid() const { return mId >= 0; }
64
68 long long id() const { return mId; }
69
78 Qgis::TileRefinementProcess refinementProcess() const { return mRefinementProcess; }
79
88 void setRefinementProcess( Qgis::TileRefinementProcess process );
89
95 void setBoundingVolume( const QgsTiledSceneBoundingVolume &volume );
96
102 const QgsTiledSceneBoundingVolume &boundingVolume() const;
103
109 void setTransform( const QgsMatrix4x4 &transform );
110
119 const QgsMatrix4x4 *transform() const { return mTransform.get(); }
120
126 QVariantMap resources() const;
127
133 void setResources( const QVariantMap &resources );
134
141 double geometricError() const { return mGeometricError; }
142
149 void setGeometricError( double error );
150
157 QUrl baseUrl() const;
158
165 void setBaseUrl( const QUrl &baseUrl );
166
172 QVariantMap metadata() const;
173
179 void setMetadata( const QVariantMap &metadata );
180
181 private:
182 long long mId = -1;
184 QgsTiledSceneBoundingVolume mBoundingVolume;
185 std::unique_ptr< QgsMatrix4x4 > mTransform;
186 QVariantMap mResources;
187 double mGeometricError = 0;
188 QUrl mBaseUrl;
189 QVariantMap mMetadata;
190
191};
192
193#endif // QGSTILEDSCENETILE_H
TileRefinementProcess
Tiled scene tile refinement processes.
Definition qgis.h:4810
@ 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 scene CRS units, of the tile's simplified ...