cesium-native 0.43.0
Loading...
Searching...
No Matches
TileLoadResult.h
1#pragma once
2
3#include "BoundingVolume.h"
4#include "TileContent.h"
5
6#include <CesiumAsync/IAssetRequest.h>
7#include <CesiumGeometry/Axis.h>
8#include <CesiumGeospatial/Ellipsoid.h>
9#include <CesiumGltf/Model.h>
10#include <CesiumRasterOverlays/RasterOverlayDetails.h>
11
12#include <functional>
13#include <memory>
14#include <optional>
15#include <variant>
16
17namespace Cesium3DTilesSelection {
18
19class Tile;
20
38using TileContentKind = std::variant<
43
53 Success,
54
59 Failed,
60
67};
68
73struct CESIUM3DTILESSELECTION_API TileLoadResult {
78
83
89 std::optional<BoundingVolume> updatedBoundingVolume;
90
96 std::optional<BoundingVolume> updatedContentBoundingVolume;
97
102 std::optional<CesiumRasterOverlays::RasterOverlayDetails>
104
109 std::shared_ptr<CesiumAsync::IAssetAccessor> pAssetAccessor;
110
114 std::shared_ptr<CesiumAsync::IAssetRequest> pCompletedRequest;
115
122 std::function<void(Tile&)> tileInitializer;
123
130
138
147 std::shared_ptr<CesiumAsync::IAssetAccessor> pAssetAccessor,
148 std::shared_ptr<CesiumAsync::IAssetRequest> pCompletedRequest);
149
158 std::shared_ptr<CesiumAsync::IAssetAccessor> pAssetAccessor,
159 std::shared_ptr<CesiumAsync::IAssetRequest> pCompletedRequest);
160};
161
162} // namespace Cesium3DTilesSelection
A tile in a Tileset.
Definition Tile.h:97
A quadratic surface defined in Cartesian coordinates.
Definition Ellipsoid.h:38
static const Ellipsoid UNIT_SPHERE
An Ellipsoid with all three radii set to one meter.
Definition Ellipsoid.h:52
Classes that implement the 3D Tiles standard.
@ Failed
Something went wrong while loading this tile and it will not be retried.
std::variant< TileUnknownContent, TileEmptyContent, TileExternalContent, CesiumGltf::Model > TileContentKind
Store the content of the tile after finishing loading tile using TilesetContentLoader::loadTileConten...
TileLoadResultState
Indicate the status of Cesium3DTilesSelection::TilesetContentLoader::loadTileContent and Cesium3DTile...
@ Success
The operation is successful and all the fields in TileLoadResult or TileChildrenResult are applied to...
@ RetryLater
The operation requires the client to retry later due to some background work happenning and none of t...
Axis
An enum describing the x, y, and z axes.
Definition Axis.h:10
A content tag that indicates a tile has no content.
Definition TileContent.h:45
A content tag that indicates a tile content points to an external tileset. When this tile is loaded,...
Definition TileContent.h:52
Store the result of loading a tile content after invoking TilesetContentLoader::loadTileContent.
std::shared_ptr< CesiumAsync::IAssetRequest > pCompletedRequest
The request that is created to download the tile content.
TileLoadResultState state
The result of loading a tile. Note that if the state is Failed or RetryLater, none of the fields abov...
TileContentKind contentKind
The content type of the tile.
std::function< void(Tile &)> tileInitializer
A callback that is invoked in the main thread immediately when the loading is finished....
std::optional< BoundingVolume > updatedContentBoundingVolume
A tile can potentially store a more fit content bounding volume along with its content....
std::optional< CesiumRasterOverlays::RasterOverlayDetails > rasterOverlayDetails
Holds details of the TileRenderContent that are useful for raster overlays.
std::optional< BoundingVolume > updatedBoundingVolume
A tile can potentially store a more fit bounding volume along with its content. If this field is set,...
static TileLoadResult createFailedResult(std::shared_ptr< CesiumAsync::IAssetAccessor > pAssetAccessor, std::shared_ptr< CesiumAsync::IAssetRequest > pCompletedRequest)
Create a result with Failed state.
std::shared_ptr< CesiumAsync::IAssetAccessor > pAssetAccessor
The asset accessor that was used to retrieve this tile, and that should be used to retrieve further r...
static TileLoadResult createRetryLaterResult(std::shared_ptr< CesiumAsync::IAssetAccessor > pAssetAccessor, std::shared_ptr< CesiumAsync::IAssetRequest > pCompletedRequest)
Create a result with RetryLater state.
CesiumGeometry::Axis glTFUpAxis
The up axis of glTF content.
A content tag that indicates the TilesetContentLoader does not know if a tile's content will point to...
Definition TileContent.h:22
This class is not meant to be instantiated directly. Use Model instead.
Definition Model.h:14