QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
tiledscene
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
20
#include "
qgstiledsceneboundingvolume.h
"
21
22
QgsTiledSceneTile::QgsTiledSceneTile
()
23
: mBoundingVolume(
QgsTiledSceneBoundingVolume
(
QgsOrientedBox3D
() ) )
24
{}
25
26
QgsTiledSceneTile::QgsTiledSceneTile
(
long
long
id
)
27
: mId(
id
)
28
, mBoundingVolume(
QgsTiledSceneBoundingVolume
(
QgsOrientedBox3D
() ) )
29
{}
30
31
QgsTiledSceneTile::~QgsTiledSceneTile
() =
default
;
32
33
QgsTiledSceneTile::QgsTiledSceneTile
(
const
QgsTiledSceneTile
&other )
34
: mId( other.mId )
35
, mRefinementProcess( other.mRefinementProcess )
36
, mBoundingVolume( other.mBoundingVolume )
37
, mResources( other.mResources )
38
, mGeometricError( other.mGeometricError )
39
, mBaseUrl( other.mBaseUrl )
40
, mMetadata( other.mMetadata )
41
{
42
mTransform.reset( other.mTransform ?
new
QgsMatrix4x4
( *other.mTransform.get() ) :
nullptr
);
43
}
44
45
QgsTiledSceneTile
&
QgsTiledSceneTile::operator=
(
const
QgsTiledSceneTile
&other )
46
{
47
if
( &other ==
this
)
48
return
*
this
;
49
50
mId = other.mId;
51
mRefinementProcess = other.mRefinementProcess;
52
mTransform.reset( other.mTransform ?
new
QgsMatrix4x4
( *other.mTransform.get() ) :
nullptr
);
53
mResources = other.mResources;
54
mGeometricError = other.mGeometricError;
55
mBoundingVolume = other.mBoundingVolume;
56
mBaseUrl = other.mBaseUrl;
57
mMetadata = other.mMetadata;
58
return
*
this
;
59
}
60
61
void
QgsTiledSceneTile::setRefinementProcess
(
Qgis::TileRefinementProcess
process )
62
{
63
mRefinementProcess = process;
64
}
65
66
void
QgsTiledSceneTile::setBoundingVolume
(
const
QgsTiledSceneBoundingVolume
&volume )
67
{
68
mBoundingVolume = volume;
69
}
70
71
const
QgsTiledSceneBoundingVolume
&
QgsTiledSceneTile::boundingVolume
()
const
72
{
73
return
mBoundingVolume;
74
}
75
76
void
QgsTiledSceneTile::setTransform
(
const
QgsMatrix4x4
&
transform
)
77
{
78
if
(
transform
.isIdentity() )
79
mTransform.reset();
80
else
81
mTransform = std::make_unique< QgsMatrix4x4 >(
transform
);
82
}
83
84
QVariantMap
QgsTiledSceneTile::resources
()
const
85
{
86
return
mResources;
87
}
88
89
void
QgsTiledSceneTile::setResources
(
const
QVariantMap &
resources
)
90
{
91
mResources =
resources
;
92
}
93
94
void
QgsTiledSceneTile::setGeometricError
(
double
error )
95
{
96
mGeometricError = error;
97
}
98
99
QUrl
QgsTiledSceneTile::baseUrl
()
const
100
{
101
return
mBaseUrl;
102
}
103
104
void
QgsTiledSceneTile::setBaseUrl
(
const
QUrl &
baseUrl
)
105
{
106
mBaseUrl =
baseUrl
;
107
}
108
109
QVariantMap
QgsTiledSceneTile::metadata
()
const
110
{
111
return
mMetadata;
112
}
113
114
void
QgsTiledSceneTile::setMetadata
(
const
QVariantMap &
metadata
)
115
{
116
mMetadata =
metadata
;
117
}
Qgis::TileRefinementProcess
TileRefinementProcess
Tiled scene tile refinement processes.
Definition
qgis.h:6476
QgsMatrix4x4
A simple 4x4 matrix implementation useful for transformation in 3D space.
Definition
qgsmatrix4x4.h:42
QgsOrientedBox3D
Represents a oriented (rotated) box in 3 dimensions.
Definition
qgsorientedbox3d.h:48
QgsTiledSceneBoundingVolume
Represents a bounding volume for a tiled scene.
Definition
qgstiledsceneboundingvolume.h:39
QgsTiledSceneTile::setTransform
void setTransform(const QgsMatrix4x4 &transform)
Sets the tile's transform.
Definition
qgstiledscenetile.cpp:76
QgsTiledSceneTile::setMetadata
void setMetadata(const QVariantMap &metadata)
Sets additional metadata attached to the tile.
Definition
qgstiledscenetile.cpp:114
QgsTiledSceneTile::setBaseUrl
void setBaseUrl(const QUrl &baseUrl)
Sets the tile's base URL.
Definition
qgstiledscenetile.cpp:104
QgsTiledSceneTile::resources
QVariantMap resources() const
Returns the resources attached to the tile.
Definition
qgstiledscenetile.cpp:84
QgsTiledSceneTile::setGeometricError
void setGeometricError(double error)
Sets the tile's geometric error, which is the error, in meters, of the tile's simplified representati...
Definition
qgstiledscenetile.cpp:94
QgsTiledSceneTile::boundingVolume
const QgsTiledSceneBoundingVolume & boundingVolume() const
Returns the bounding volume for the tile.
Definition
qgstiledscenetile.cpp:71
QgsTiledSceneTile::QgsTiledSceneTile
QgsTiledSceneTile()
Constructor for an invalid tile.
Definition
qgstiledscenetile.cpp:22
QgsTiledSceneTile::setRefinementProcess
void setRefinementProcess(Qgis::TileRefinementProcess process)
Sets the tile's refinement process.
Definition
qgstiledscenetile.cpp:61
QgsTiledSceneTile::setBoundingVolume
void setBoundingVolume(const QgsTiledSceneBoundingVolume &volume)
Sets the bounding volume for the tile.
Definition
qgstiledscenetile.cpp:66
QgsTiledSceneTile::metadata
QVariantMap metadata() const
Returns additional metadata attached to the tile.
Definition
qgstiledscenetile.cpp:109
QgsTiledSceneTile::id
long long id() const
Returns the tile's unique ID.
Definition
qgstiledscenetile.h:65
QgsTiledSceneTile::transform
const QgsMatrix4x4 * transform() const
Returns the tile's transform.
Definition
qgstiledscenetile.h:116
QgsTiledSceneTile::setResources
void setResources(const QVariantMap &resources)
Sets the resources attached to the tile.
Definition
qgstiledscenetile.cpp:89
QgsTiledSceneTile::baseUrl
QUrl baseUrl() const
Returns the tile's base URL.
Definition
qgstiledscenetile.cpp:99
QgsTiledSceneTile::operator=
QgsTiledSceneTile & operator=(const QgsTiledSceneTile &other)
Definition
qgstiledscenetile.cpp:45
QgsTiledSceneTile::~QgsTiledSceneTile
~QgsTiledSceneTile()
qgstiledsceneboundingvolume.h
qgstiledscenetile.h
Generated on
for QGIS API Documentation by
1.17.0