18#ifndef QGSCESIUMIMPLICITTILING_H
19#define QGSCESIUMIMPLICITTILING_H
21#include <nlohmann/json.hpp>
157 static int subtreeTileCount(
int levels );
158 static int mortonIndex(
int x,
int y );
TileChildrenAvailability
Possible availability states for a tile's children.
TileRefinementProcess
Tiled scene tile refinement processes.
@ Replacement
When tile is refined then its children should be used in place of itself.
A 3-dimensional box composed of x, y, z coordinates.
Contains utilities for working with Cesium 3D Tiles implicit tiling.
static QMap< TileCoordinate, QgsTiledSceneNode * > createImplicitTilingChildren(QgsTiledSceneNode *node, const TileCoordinate &coord, Root &tilingData, const TileCoordinate &subtreeCoord, QgsCoordinateTransformContext &transformContext, long long &nextTileId)
Creates immediate children of a node according to implicit tiling.
static TileCoordinate tileCoordinateToParentSubtree(TileCoordinate coord, int subtreeLevels)
Returns parent subtree's tile coordinates of the given tile.
static QString expandTemplateUri(const QString &templateUri, const QUrl &baseUrl, const TileCoordinate &coord)
Expands template URI (using {level}, {x}, {y} markers) to the final URI.
static Qgis::TileChildrenAvailability childAvailability(const Root &tilingData, const TileCoordinate &coord)
Returns tile availability of a child based on cached subtree data.
static bool parseImplicitTiling(const json &tileJson, QgsTiledSceneNode *newNode, const QUrl &baseUrl, Qgis::Axis gltfUpAxis, Root &tilingData)
Parses JSON definition of implicit tiling into tilingData argument and returns true on success.
static Subtree parseSubtree(const Root &tilingData, const QByteArray &data)
Parses subtree definition and returns it.
static int subtreeBitIndex(int localLevel, int localX, int localY)
Returns the bit index within a subtree's availability bitstream for a given local tile position.
Contains information about the context in which a coordinate transform is executed.
Represents a bounding volume for a tiled scene.
Allows representing QgsTiledSceneTiles in a hierarchical tree.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
Definition of root implicit tiling node (typically root node of the whole tileset,...
QMap< TileCoordinate, Subtree > subtreeCache
Qgis::TileRefinementProcess refinementProcess
double rootGeometricError
QString contentUriTemplate
std::optional< QgsBox3D > rootRegion
if the root node uses "region" bounding volume (in lat/lon), we use it to create child regions and th...
int subtreeLevels
how many levels are stored in a single subtree
int availableLevels
total number of available levels within the implicit tiling
std::optional< QgsMatrix4x4 > rootTransform
QgsTiledSceneBoundingVolume rootBoundingVolume
if the root node uses OBB as the bounding volume, we use it directly to create child volumes
QString subtreeUriTemplate
Data about subtree of a node - there should be subtree at least for root implicit tiling node,...
QBitArray contentAvailability
Bit array whether a tile has some content.
QBitArray tileAvailability
Bit array whether a tile is available.
QBitArray childSubtreeAvailability
Bit array to know where to look for more subtree definitions deeper in the hierarchy.
Contains ZXY coordinates of a node within implicit tiling.
bool operator==(const TileCoordinate &) const =default
friend size_t qHash(const TileCoordinate &c, size_t seed=0)
auto operator<=>(const TileCoordinate &) const =default