cesium-native  0.41.0
TilesetOptions.h
1 #pragma once
2 
3 #include "Library.h"
4 
5 #include <CesiumGeospatial/Ellipsoid.h>
6 #include <CesiumGltf/Ktx2TranscodeTargets.h>
7 
8 #include <functional>
9 #include <memory>
10 #include <optional>
11 #include <string>
12 #include <vector>
13 
14 namespace Cesium3DTilesSelection {
15 
16 class ITileExcluder;
17 class TilesetLoadFailureDetails;
18 
23 struct CESIUM3DTILESSELECTION_API TilesetContentOptions {
30  bool enableWaterMask = false;
31 
42  bool generateMissingNormalsSmooth = false;
43 
49 
56  bool applyTextureTransform = true;
57 };
58 
64 struct CESIUM3DTILESSELECTION_API FogDensityAtHeight {
65 
67  double cameraHeight;
68 
70  double fogDensity;
71 };
72 
76 struct CESIUM3DTILESSELECTION_API TilesetOptions {
80  std::optional<std::string> credit;
81 
85  bool showCreditsOnScreen = false;
86 
96  double maximumScreenSpaceError = 16.0;
97 
102  uint32_t maximumSimultaneousTileLoads = 20;
103 
108  uint32_t maximumSimultaneousSubtreeLoads = 20;
109 
116  bool preloadAncestors = true;
117 
124  bool preloadSiblings = true;
125 
136  uint32_t loadingDescendantLimit = 20;
137 
149  bool forbidHoles = false;
150 
154  bool enableFrustumCulling = true;
155 
159  bool enableOcclusionCulling = true;
160 
170  bool delayRefinementForOcclusion = true;
171 
175  bool enableFogCulling = true;
176 
186  bool enforceCulledScreenSpaceError = true;
187 
196  double culledScreenSpaceError = 64.0;
197 
207  int64_t maximumCachedBytes = 512 * 1024 * 1024;
208 
221  std::vector<FogDensityAtHeight> fogDensityTable = {
222  {359.393, 2.0e-5}, {800.749, 2.0e-4}, {1275.6501, 1.0e-4},
223  {2151.1192, 7.0e-5}, {3141.7763, 5.0e-5}, {4777.5198, 4.0e-5},
224  {6281.2493, 3.0e-5}, {12364.307, 1.9e-5}, {15900.765, 1.0e-5},
225  {49889.0549, 8.5e-6}, {78026.8259, 6.2e-6}, {99260.7344, 5.8e-6},
226  {120036.3873, 5.3e-6}, {151011.0158, 5.2e-6}, {156091.1953, 5.1e-6},
227  {203849.3112, 4.2e-6}, {274866.9803, 4.0e-6}, {319916.3149, 3.4e-6},
228  {493552.0528, 2.6e-6}, {628733.5874, 2.2e-6}, {1000000.0, 0.0}};
229 
239  bool renderTilesUnderCamera = true;
240 
246  std::vector<std::shared_ptr<ITileExcluder>> excluders;
247 
256  std::function<void(const TilesetLoadFailureDetails&)> loadErrorCallback;
257 
267  bool enableLodTransitionPeriod = false;
268 
278  float lodTransitionLength = 1.0f;
279 
289  bool kickDescendantsWhileFadingIn = true;
290 
300  double mainThreadLoadingTimeLimit = 0.0;
301 
307  double tileCacheUnloadTimeLimit = 0.0;
308 
314 
321  std::any rendererOptions;
322 
331 };
332 
333 } // namespace Cesium3DTilesSelection
A quadratic surface defined in Cartesian coordinates.
Definition: Ellipsoid.h:38
static const Ellipsoid WGS84
An Ellipsoid instance initialized to the WGS84 standard.
Definition: Ellipsoid.h:47
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::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 prepareInLoadThread.
For each possible input transmission format, this struct names the ideal target gpu-compressed pixel ...