cesium-native 0.44.2
Loading...
Searching...
No Matches
TilesetOptions.h
1#pragma once
2
3#include <Cesium3DTilesSelection/Library.h>
4#include <CesiumAsync/IAssetAccessor.h>
5#include <CesiumGeospatial/Ellipsoid.h>
6#include <CesiumGltf/Ktx2TranscodeTargets.h>
7
8#include <any>
9#include <functional>
10#include <memory>
11#include <optional>
12#include <string>
13#include <vector>
14
15namespace Cesium3DTilesSelection {
16
17class ITileExcluder;
18class TilesetLoadFailureDetails;
19
24struct CESIUM3DTILESSELECTION_API TilesetContentOptions {
31 bool enableWaterMask = false;
32
43 bool generateMissingNormalsSmooth = false;
44
50
57 bool applyTextureTransform = true;
58};
59
65struct CESIUM3DTILESSELECTION_API FogDensityAtHeight {
66
69
71 double fogDensity;
72};
73
77struct CESIUM3DTILESSELECTION_API TilesetOptions {
81 std::optional<std::string> credit;
82
86 bool showCreditsOnScreen = false;
87
97 double maximumScreenSpaceError = 16.0;
98
103 uint32_t maximumSimultaneousTileLoads = 20;
104
109 uint32_t maximumSimultaneousSubtreeLoads = 20;
110
117 bool preloadAncestors = true;
118
125 bool preloadSiblings = true;
126
137 uint32_t loadingDescendantLimit = 20;
138
150 bool forbidHoles = false;
151
155 bool enableFrustumCulling = true;
156
160 bool enableOcclusionCulling = true;
161
171 bool delayRefinementForOcclusion = true;
172
176 bool enableFogCulling = true;
177
187 bool enforceCulledScreenSpaceError = true;
188
197 double culledScreenSpaceError = 64.0;
198
208 int64_t maximumCachedBytes = 512LL * 1024 * 1024;
209
222 std::vector<FogDensityAtHeight> fogDensityTable = {
223 {359.393, 2.0e-5}, {800.749, 2.0e-4}, {1275.6501, 1.0e-4},
224 {2151.1192, 7.0e-5}, {3141.7763, 5.0e-5}, {4777.5198, 4.0e-5},
225 {6281.2493, 3.0e-5}, {12364.307, 1.9e-5}, {15900.765, 1.0e-5},
226 {49889.0549, 8.5e-6}, {78026.8259, 6.2e-6}, {99260.7344, 5.8e-6},
227 {120036.3873, 5.3e-6}, {151011.0158, 5.2e-6}, {156091.1953, 5.1e-6},
228 {203849.3112, 4.2e-6}, {274866.9803, 4.0e-6}, {319916.3149, 3.4e-6},
229 {493552.0528, 2.6e-6}, {628733.5874, 2.2e-6}, {1000000.0, 0.0}};
230
240 bool renderTilesUnderCamera = true;
241
247 std::vector<std::shared_ptr<ITileExcluder>> excluders;
248
257 std::function<void(const TilesetLoadFailureDetails&)> loadErrorCallback;
258
268 bool enableLodTransitionPeriod = false;
269
279 float lodTransitionLength = 1.0f;
280
290 bool kickDescendantsWhileFadingIn = true;
291
301 double mainThreadLoadingTimeLimit = 0.0;
302
308 double tileCacheUnloadTimeLimit = 0.0;
309
315
323
332
336 std::vector<CesiumAsync::IAssetAccessor::THeader> requestHeaders;
337};
338
339} // namespace Cesium3DTilesSelection
A quadratic surface defined in Cartesian coordinates.
Definition Ellipsoid.h:39
static const Ellipsoid WGS84
An Ellipsoid instance initialized to the WGS84 standard.
Definition Ellipsoid.h:48
Classes that implement the 3D Tiles standard.
Defines the fog density at a certain height.
Options for configuring the parsing of a Tileset's content and construction of Gltf models.
CesiumGltf::Ktx2TranscodeTargets ktx2TranscodeTargets
For each possible input transmission format, this struct names the ideal target gpu-compressed pixel ...
Additional options for configuring a Tileset.
std::function< void(const TilesetLoadFailureDetails &)> loadErrorCallback
A callback function that is invoked when a tileset resource fails to load.
std::vector< std::shared_ptr< ITileExcluder > > excluders
A list of interfaces that are given an opportunity to exclude tiles from loading and rendering....
std::vector< CesiumAsync::IAssetAccessor::THeader > requestHeaders
HTTP headers to attach to requests made for this tileset.
std::optional< std::string > credit
A credit text for this tileset, if needed.
TilesetContentOptions contentOptions
Options for configuring the parsing of a Tileset's content and construction of Gltf models.
std::any rendererOptions
Arbitrary data that will be passed to IPrepareRendererResources::prepareInLoadThread.
For each possible input transmission format, this struct names the ideal target gpu-compressed pixel ...