QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgscesiumutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgscesiumutils.h
3 --------------------
4 begin : July 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 QGSCESIUMUTILS_H
20#define QGSCESIUMUTILS_H
21
22#include <nlohmann/json_fwd.hpp>
23
24#include "qgis_core.h"
25#include "qgis_sip.h"
26#include "qgsbox3d.h"
27#include "qgsvector3d.h"
28
29#ifndef SIP_RUN
30using namespace nlohmann;
31#endif
32
33class QgsSphere;
35class QgsMatrix4x4;
36
44class CORE_EXPORT QgsCesiumUtils
45{
46 public:
47
48#ifndef SIP_RUN
49
55 static QgsBox3D parseRegion( const json &region );
56#endif
57
61 static QgsBox3D parseRegion( const QVariantList &region );
62
63#ifndef SIP_RUN
64
70 static QgsOrientedBox3D parseBox( const json &box );
71#endif
72
76 static QgsOrientedBox3D parseBox( const QVariantList &box );
77
78#ifndef SIP_RUN
79
85 static QgsSphere parseSphere( const json &sphere );
86#endif
87
91 static QgsSphere parseSphere( const QVariantList &sphere );
92
96 static QgsSphere transformSphere( const QgsSphere &sphere, const QgsMatrix4x4 &transform );
97
102 {
104 QByteArray gltf;
105
108 };
109
114 static B3DMContents extractGltfFromB3dm( const QByteArray &tileContent );
115
120 {
122 QByteArray gltf;
123
126 };
127
134 static TileContents extractGltfFromTileContent( const QByteArray &tileContent );
135
136};
137
138#endif // QGSCESIUMUTILS_H
A 3-dimensional box composed of x, y, z coordinates.
Definition qgsbox3d.h:42
Contains utilities for working with Cesium data.
static QgsSphere parseSphere(const json &sphere)
Parses a sphere object from a Cesium JSON document.
static B3DMContents extractGltfFromB3dm(const QByteArray &tileContent)
Extracts GLTF binary data and other contents from the legacy b3dm (Batched 3D Model) tile format.
static QgsOrientedBox3D parseBox(const json &box)
Parses a box object from a Cesium JSON document to an oriented bounding box.
static QgsBox3D parseRegion(const json &region)
Parses a region object from a Cesium JSON object to a 3D box.
static QgsSphere transformSphere(const QgsSphere &sphere, const QgsMatrix4x4 &transform)
Applies a transform to a sphere.
static TileContents extractGltfFromTileContent(const QByteArray &tileContent)
Parses tile content.
A simple 4x4 matrix implementation useful for transformation in 3D space.
Represents a oriented (rotated) box in 3 dimensions.
A spherical geometry object.
Definition qgssphere.h:42
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
Definition qgsvector3d.h:30
Encapsulates the contents of a B3DM file.
QByteArray gltf
GLTF binary content.
QgsVector3D rtcCenter
Optional RTC center.
Encapsulates the contents of a 3D tile.
QgsVector3D rtcCenter
Center position of relative-to-center coordinates (when used).
QByteArray gltf
GLTF binary content.