QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgstiledscenetile.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgstiledscenetile.cpp
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 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#include "qgstiledscenetile.h"
19
21
27
29 : mId( id )
30 , mBoundingVolume( QgsTiledSceneBoundingVolume( QgsOrientedBox3D() ) )
31{
32
33}
34
36
38 : mId( other.mId )
39 , mRefinementProcess( other.mRefinementProcess )
40 , mBoundingVolume( other.mBoundingVolume )
41 , mResources( other.mResources )
42 , mGeometricError( other.mGeometricError )
43 , mBaseUrl( other.mBaseUrl )
44 , mMetadata( other.mMetadata )
45{
46 mTransform.reset( other.mTransform ? new QgsMatrix4x4( *other.mTransform.get() ) : nullptr );
47}
48
50{
51 if ( &other == this )
52 return *this;
53
54 mId = other.mId;
55 mRefinementProcess = other.mRefinementProcess;
56 mTransform.reset( other.mTransform ? new QgsMatrix4x4( *other.mTransform.get() ) : nullptr );
57 mResources = other.mResources;
58 mGeometricError = other.mGeometricError;
59 mBoundingVolume = other.mBoundingVolume;
60 mBaseUrl = other.mBaseUrl;
61 mMetadata = other.mMetadata;
62 return *this;
63}
64
66{
67 mRefinementProcess = process;
68}
69
71{
72 mBoundingVolume = volume;
73}
74
76{
77 return mBoundingVolume;
78}
79
81{
82 if ( transform.isIdentity() )
83 mTransform.reset();
84 else
85 mTransform = std::make_unique< QgsMatrix4x4 >( transform );
86}
87
89{
90 return mResources;
91}
92
94{
95 mResources = resources;
96}
97
99{
100 mGeometricError = error;
101}
102
104{
105 return mBaseUrl;
106}
107
109{
110 mBaseUrl = baseUrl;
111}
112
114{
115 return mMetadata;
116}
117
118void QgsTiledSceneTile::setMetadata( const QVariantMap &metadata )
119{
120 mMetadata = metadata;
121}
TileRefinementProcess
Tiled scene tile refinement processes.
Definition qgis.h:5656
A simple 4x4 matrix implementation useful for transformation in 3D space.
Represents a oriented (rotated) box in 3 dimensions.
Represents a bounding volume for a tiled scene.
void setTransform(const QgsMatrix4x4 &transform)
Sets the tile's transform.
void setMetadata(const QVariantMap &metadata)
Sets additional metadata attached to the tile.
void setBaseUrl(const QUrl &baseUrl)
Sets the tile's base URL.
QVariantMap resources() const
Returns the resources attached to the tile.
void setGeometricError(double error)
Sets the tile's geometric error, which is the error, in meters, of the tile's simplified representati...
const QgsTiledSceneBoundingVolume & boundingVolume() const
Returns the bounding volume for the tile.
QgsTiledSceneTile()
Constructor for an invalid tile.
void setRefinementProcess(Qgis::TileRefinementProcess process)
Sets the tile's refinement process.
void setBoundingVolume(const QgsTiledSceneBoundingVolume &volume)
Sets the bounding volume for the tile.
QVariantMap metadata() const
Returns additional metadata attached to the tile.
long long id() const
Returns the tile's unique ID.
const QgsMatrix4x4 * transform() const
Returns the tile's transform.
void setResources(const QVariantMap &resources)
Sets the resources attached to the tile.
QUrl baseUrl() const
Returns the tile's base URL.
QgsTiledSceneTile & operator=(const QgsTiledSceneTile &other)