QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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.h"
23#include "qgis_core.h"
24#include "qgsmatrix4x4.h"
26
27#include <QUrl>
28
35class CORE_EXPORT QgsTiledSceneTile
36{
37 public:
44
50 explicit QgsTiledSceneTile( long long id );
51
53
56
60 bool isValid() const { return mId >= 0; }
61
65 long long id() const { return mId; }
66
75 Qgis::TileRefinementProcess refinementProcess() const { return mRefinementProcess; }
76
85 void setRefinementProcess( Qgis::TileRefinementProcess process );
86
92 void setBoundingVolume( const QgsTiledSceneBoundingVolume &volume );
93
99 const QgsTiledSceneBoundingVolume &boundingVolume() const;
100
106 void setTransform( const QgsMatrix4x4 &transform );
107
116 const QgsMatrix4x4 *transform() const { return mTransform.get(); }
117
123 QVariantMap resources() const;
124
130 void setResources( const QVariantMap &resources );
131
138 double geometricError() const { return mGeometricError; }
139
146 void setGeometricError( double error );
147
154 QUrl baseUrl() const;
155
162 void setBaseUrl( const QUrl &baseUrl );
163
169 QVariantMap metadata() const;
170
176 void setMetadata( const QVariantMap &metadata );
177
178 private:
179 long long mId = -1;
181 QgsTiledSceneBoundingVolume mBoundingVolume;
182 std::unique_ptr< QgsMatrix4x4 > mTransform;
183 QVariantMap mResources;
184 double mGeometricError = 0;
185 QUrl mBaseUrl;
186 QVariantMap mMetadata;
187};
188
189#endif // QGSTILEDSCENETILE_H
TileRefinementProcess
Tiled scene tile refinement processes.
Definition qgis.h:6012
@ Replacement
When tile is refined then its children should be used in place of itself.
Definition qgis.h:6013
A simple 4x4 matrix implementation useful for transformation in 3D space.
Represents a bounding volume for a tiled scene.
bool isValid() const
Returns true if the tile is a valid tile (i.e.
Qgis::TileRefinementProcess refinementProcess() const
Returns the tile's refinement process.
QgsTiledSceneTile()
Constructor for an invalid tile.
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...
QgsTiledSceneTile & operator=(const QgsTiledSceneTile &other)