cesium-native 0.62.0
Loading...
Searching...
No Matches
TilesetOptions.h
1#pragma once
2
3#include <Cesium3DTilesSelection/Library.h>
4#include <Cesium3DTilesSelection/TilesetContentOptions.h>
5#include <CesiumAsync/IAssetAccessor.h>
6#include <CesiumGeospatial/Ellipsoid.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;
19
25struct CESIUM3DTILESSELECTION_API FogDensityAtHeight {
26
29
31 double fogDensity;
32};
33
37struct CESIUM3DTILESSELECTION_API TilesetOptions {
41 std::optional<std::string> credit;
42
46 bool showCreditsOnScreen = false;
47
58
64
71 bool preloadAncestors = true;
72
79 bool preloadSiblings = true;
80
92
104 bool forbidHoles = false;
105
110
115
126
130 bool enableFogCulling = true;
131
142
152
162 int64_t maximumCachedBytes = 512LL * 1024 * 1024;
163
176 std::vector<FogDensityAtHeight> fogDensityTable = {
177 {359.393, 2.0e-5}, {800.749, 2.0e-4}, {1275.6501, 1.0e-4},
178 {2151.1192, 7.0e-5}, {3141.7763, 5.0e-5}, {4777.5198, 4.0e-5},
179 {6281.2493, 3.0e-5}, {12364.307, 1.9e-5}, {15900.765, 1.0e-5},
180 {49889.0549, 8.5e-6}, {78026.8259, 6.2e-6}, {99260.7344, 5.8e-6},
181 {120036.3873, 5.3e-6}, {151011.0158, 5.2e-6}, {156091.1953, 5.1e-6},
182 {203849.3112, 4.2e-6}, {274866.9803, 4.0e-6}, {319916.3149, 3.4e-6},
183 {493552.0528, 2.6e-6}, {628733.5874, 2.2e-6}, {1000000.0, 0.0}};
184
195
201 std::vector<std::shared_ptr<ITileExcluder>> excluders;
202
211 std::function<void(const TilesetLoadFailureDetails&)> loadErrorCallback;
212
227
240
252
263
270
276
284
293
297 std::vector<CesiumAsync::IAssetAccessor::THeader> requestHeaders;
298};
299
300} // namespace Cesium3DTilesSelection
An interface that allows tiles to be excluded from loading and rendering when provided in TilesetOpti...
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 the contents of a Tileset, including construction of its glTF mod...
Additional options for configuring a Tileset.
uint32_t loadingDescendantLimit
The number of loading descendant tiles that is considered "toomany". If a tile has too many loading d...
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....
bool preloadAncestors
Indicates whether the ancestors of rendered tiles should be preloaded. Setting this to true optimizes...
std::vector< CesiumAsync::IAssetAccessor::THeader > requestHeaders
HTTP headers to attach to requests made for this tileset.
uint32_t maximumSimultaneousTileLoads
The maximum number of tiles that may simultaneously be in the process of loading.
bool enableOcclusionCulling
Enable culling of occluded tiles, as reported by the renderer.
double mainThreadLoadingTimeLimit
A soft limit on how long (in milliseconds) to spend on the main-thread part of tile loading each fram...
double tileCacheUnloadTimeLimit
A soft limit on how long (in milliseconds) to spend unloading cached tiles each frame (each call to T...
std::vector< FogDensityAtHeight > fogDensityTable
A table that maps the camera height above the ellipsoid to a fog density. Tiles that are in full fog ...
float lodTransitionLength
How long it should take to transition between tiles of different LODs, in seconds.
double culledScreenSpaceError
The screen-space error to refine until for culled tiles from disabled culling stages.
bool kickDescendantsWhileFadingIn
Whether to kick descendants while a tile is still fading in.
bool delayRefinementForOcclusion
Wait to refine until the occlusion state of a tile is known.
std::optional< std::string > credit
A credit text for this tileset, if needed.
int64_t maximumCachedBytes
The maximum number of bytes that may be cached.
bool preloadSiblings
Indicates whether the siblings of rendered tiles should be preloaded. Setting this to true causes til...
double maximumScreenSpaceError
The maximum number of pixels of error when rendering this tileset. This is used to select an appropri...
bool enableFrustumCulling
Enable culling of tiles against the frustum.
bool renderTilesUnderCamera
Whether to render tiles directly under the camera, even if they're not in the view frustum.
bool showCreditsOnScreen
Whether or not to display tileset's credits on the screen.
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.
bool enableFogCulling
Enable culling of tiles that cannot be seen through atmospheric fog.
CesiumGeospatial::Ellipsoid ellipsoid
The ellipsoid to use for this tileset. This value shouldn't be changed after the tileset is construct...
bool enableLodTransitionPeriod
Whether to keep tiles loaded during a transition period when switching to a different LOD tile.
bool forbidHoles
Never render a tileset with missing tiles.
bool enforceCulledScreenSpaceError
Whether culled tiles should be refined until they meet culledScreenSpaceError.