cesium-native  0.41.0
Cesium3DTilesSelection Namespace Reference

Classes that implement the 3D Tiles standard. More...

Classes

struct  TileLoadResultAndRenderResources
 
class  IPrepareRendererResources
 When implemented for a rendering engine, allows renderer resources to be created and destroyed under the control of a Tileset. More...
 
class  ITileExcluder
 An interface that allows tiles to be excluded from loading and rendering when provided in TilesetOptions::excluders. More...
 
class  RasterizedPolygonsTileExcluder
 When provided to TilesetOptions::excluders, uses the polygons owned by a RasterizedPolygonsOverlay to exclude tiles that are entirely inside any of the polygon from loading. This is useful when the polygons will be used for clipping. More...
 
class  RasterMappedTo3DTile
 The result of applying a RasterOverlayTile to geometry. More...
 
class  RasterOverlayCollection
 A collection of RasterOverlay instances that are associated with a Tileset. More...
 
struct  SampleHeightResult
 The result of sampling heights with Tileset::sampleHeightMostDetailed. More...
 
class  Tile
 A tile in a Tileset. More...
 
struct  TileUnknownContent
 A content tag that indicates the TilesetContentLoader does not know if a tile's content will point to a mesh content or an external tileset. The content of the tile is only known when the loader loads the tile to inspect the content. More...
 
struct  TileEmptyContent
 A content tag that indicates a tile has no content. More...
 
struct  TileExternalContent
 A content tag that indicates a tile content points to an external tileset. When this tile is loaded, all the tiles in the external tileset will become children of this external content tile. More...
 
class  TileRenderContent
 A content tag that indicates a tile has a glTF model content and render resources for the model. More...
 
class  TileContent
 A tile content container that can store and query the content type that is currently being owned by the tile. More...
 
struct  TileIdUtilities
 Utility functions related to TileID objects. More...
 
struct  TileLoadResult
 Store the result of loading a tile content after invoking TilesetContentLoader::loadTileContent. More...
 
class  TileOcclusionRendererProxy
 An interface for client renderers to use to represent tile bounding volumes that should be occlusion tested. More...
 
class  TileOcclusionRendererProxyPool
 A pool of TileOcclusionRendererProxy objects. Allows quick remapping of tiles to occlusion renderer proxies so new proxies do not have to be created for each new tile requesting occlusion results. More...
 
class  TileSelectionState
 A description of the state of a Tile during the rendering process. More...
 
class  Tileset
 A 3D Tiles tileset, used for streaming massive heterogeneous 3D geospatial datasets. More...
 
struct  TileLoadInput
 Store the parameters that are needed to load a tile. More...
 
struct  TileChildrenResult
 Store the result of creating tile's children after invoking TilesetContentLoader::createTileChildren. More...
 
class  TilesetContentLoader
 The loader interface to load the tile content. More...
 
class  TilesetExternals
 External interfaces used by a Tileset. More...
 
class  TilesetLoadFailureDetails
 
class  TilesetMetadata
 Holds the metadata associated with a Tileset or an external tileset. More...
 
struct  TilesetContentOptions
 Options for configuring the parsing of a Tileset's content and construction of Gltf models. More...
 
struct  FogDensityAtHeight
 Defines the fog density at a certain height. More...
 
struct  TilesetOptions
 Additional options for configuring a Tileset. More...
 
class  TilesetSharedAssetSystem
 Contains assets that are potentially shared across multiple Tilesets. More...
 
class  ViewState
 The state of the view that is used during the traversal of a tileset. More...
 
class  ViewUpdateResult
 Reports the results of Tileset::updateView. More...
 
struct  CullingVolume
 A culling volume, defined by four planes. More...
 

Typedefs

typedef std::variant< CesiumGeometry::BoundingSphere, CesiumGeometry::OrientedBoundingBox, CesiumGeospatial::BoundingRegion, CesiumGeospatial::BoundingRegionWithLooseFittingHeights, CesiumGeospatial::S2CellBoundingVolumeBoundingVolume
 A bounding volume. More...
 
typedef std::variant< std::string, CesiumGeometry::QuadtreeTileID, CesiumGeometry::OctreeTileID, CesiumGeometry::UpsampledQuadtreeNodeTileID
 An identifier for a Tile inside the tile hierarchy. More...
 
using TileContentKind = std::variant< TileUnknownContent, TileEmptyContent, TileExternalContent, CesiumGltf::Model >
 Store the content of the tile after finishing loading tile using TilesetContentLoader::loadTileContent: More...
 

Enumerations

enum class  TileLoadState {
  Unloading = -2 , FailedTemporarily = -1 , Unloaded = 0 , ContentLoading = 1 ,
  ContentLoaded = 2 , Done = 3 , Failed = 4
}
 
enum class  TileLoadResultState { Success , Failed , RetryLater }
 Indicate the status of TilesetContentLoader::loadTileContent and TilesetContentLoader::createTileChildren operations. More...
 
enum class  TileOcclusionState { OcclusionUnavailable , NotOccluded , Occluded }
 
enum class  TileRefine { Add = 0 , Replace = 1 }
 Refinement strategies for a Cesium3DTilesSelection::Tile. More...
 
enum class  TilesetLoadType { Unknown , CesiumIon , TilesetJson }
 The type of load that failed in TilesetLoadFailureDetails. More...
 

Functions

BoundingVolume transformBoundingVolume (const glm::dmat4x4 &transform, const BoundingVolume &boundingVolume)
 Transform the given BoundingVolume with the given matrix. More...
 
glm::dvec3 getBoundingVolumeCenter (const BoundingVolume &boundingVolume)
 Returns the center of the given BoundingVolume. More...
 
std::optional< CesiumGeospatial::GlobeRectangleestimateGlobeRectangle (const BoundingVolume &boundingVolume, const CesiumGeospatial::Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID)
 Estimates the bounding CesiumGeospatial::GlobeRectangle of the given BoundingVolume. More...
 
const CesiumGeospatial::BoundingRegiongetBoundingRegionFromBoundingVolume (const BoundingVolume &boundingVolume)
 Returns the bounding region if the bounding volume is a BoundingRegion or a BoundingRegionWithLooseFittingHeights. More...
 
CesiumGeometry::OrientedBoundingBox getOrientedBoundingBoxFromBoundingVolume (const BoundingVolume &boundingVolume, const CesiumGeospatial::Ellipsoid &ellipsoid CESIUM_DEFAULT_ELLIPSOID)
 Returns an oriented bounding box that contains the given BoundingVolume. More...
 
CullingVolume createCullingVolume (const glm::dvec3 &position, const glm::dvec3 &direction, const glm::dvec3 &up, double fovx, double fovy) noexcept
 Creates a CullingVolume for a perspective frustum. More...
 

Detailed Description

Classes that implement the 3D Tiles standard.

The occlusion state of a tile as reported by the renderer proxy.

Typedef Documentation

◆ BoundingVolume

◆ TileContentKind

Store the content of the tile after finishing loading tile using TilesetContentLoader::loadTileContent:

  1. Returning TileUnknownContent means that the loader doesn't know the content of the tile. This content type is useful when loader fails to load the tile content; or a background task is running to determine the tile content and the loader wants the client to retry later at some point in the future
  2. Returning TileEmptyContent means that this tile has no content and mostly used for efficient culling during the traversal process
  3. Returning TileExternalContent means that this tile points to an external tileset
  4. Returning CesiumGltf::Model means that this tile has glTF model

Definition at line 38 of file TileLoadResult.h.

◆ TileID

An identifier for a Tile inside the tile hierarchy.

This ID is stored in the tile as the Tile::getTileID. It is assigned to the tile at construction time, and may be used to identify and access the children of a given tile.

Depending on the exact type of the tile and its contents, this identifier may have different forms:

  • A std::string: This is an explicitly-described tile and the ID is the URL of the tile's content.
  • A CesiumGeometry::QuadtreeTileID: This is an implicit tile in the quadtree. The URL of the tile's content is formed by instantiating the context's template URL with this ID.
  • A CesiumGeometry::OctreeTileID: This is an implicit tile in the octree. The URL of the tile's content is formed by instantiating the context's template URL with this ID.
  • A CesiumGeometry::UpsampledQuadtreeNode: This tile doesn't have any content, but content for it can be created by subdividing the parent tile's content.

Definition at line 40 of file TileID.h.

Enumeration Type Documentation

◆ TileLoadResultState

Indicate the status of TilesetContentLoader::loadTileContent and TilesetContentLoader::createTileChildren operations.

Enumerator
Success 

The operation is successful and all the fields in TileLoadResult or TileChildrenResult are applied to the tile.

Failed 

The operation is failed and none of the fields in TileLoadResult or TileChildrenResult are applied to the tile.

RetryLater 

The operation requires the client to retry later due to some background work happenning and none of the fields in TileLoadResult or TileChildrenResult are applied to the tile.

Definition at line 48 of file TileLoadResult.h.

◆ TileLoadState

The current state of this tile in the loading process.

Enumerator
Unloading 

This tile is in the process of being unloaded, but could not be fully unloaded because an asynchronous process is using its loaded data.

FailedTemporarily 

Something went wrong while loading this tile, but it may be a temporary problem.

Unloaded 

The tile is not yet loaded at all, beyond the metadata in tileset.json.

ContentLoading 

The tile content is currently being loaded.

Note that while a tile is in this state, its Tile::getContent, and Tile::getState, methods may be called from the load thread, and the state may change due to the internal loading process.

ContentLoaded 

The tile content has finished loading.

Done 

The tile is completely done loading.

Failed 

Something went wrong while loading this tile and it will not be retried.

Definition at line 29 of file Tile.h.

◆ TileOcclusionState

Enumerator
OcclusionUnavailable 

The renderer does not yet know if the tile's bounding volume is occluded or not.

This can be due to the typical occlusion delay caused by buffered rendering or otherwise be due to postponed occlusion queries. We can choose to wait for the occlusion information to become available before commiting to load the tile. This might prevent unneeded tile loads at the cost of a small delay.

NotOccluded 

The tile's bounding volume is known by the renderer to be visible.

Occluded 

The tile's bounding volume is known by the renderer to be occluded.

Definition at line 14 of file TileOcclusionRendererProxy.h.

◆ TileRefine

Refinement strategies for a Cesium3DTilesSelection::Tile.

Enumerator
Add 

The content of the child tiles will be added to the content of the parent tile.

Replace 

The content of the child tiles will replace the content of the parent tile.

Definition at line 8 of file TileRefine.h.

◆ TilesetLoadType

The type of load that failed in TilesetLoadFailureDetails.

Enumerator
Unknown 

An unknown load error.

CesiumIon 

A Cesium ion asset endpoint.

TilesetJson 

The root tileset.json.

Definition at line 17 of file TilesetLoadFailureDetails.h.

Function Documentation

◆ createCullingVolume()

CullingVolume Cesium3DTilesSelection::createCullingVolume ( const glm::dvec3 &  position,
const glm::dvec3 &  direction,
const glm::dvec3 &  up,
double  fovx,
double  fovy 
)
noexcept

Creates a CullingVolume for a perspective frustum.

Parameters
positionThe eye position
directionThe viewing direction
upThe up-vector of the frustum
fovxThe horizontal Field-Of-View angle, in radians
fovyThe vertical Field-Of-View angle, in radians
Returns
The CullingVolume

◆ estimateGlobeRectangle()

std::optional<CesiumGeospatial::GlobeRectangle> Cesium3DTilesSelection::estimateGlobeRectangle ( const BoundingVolume boundingVolume,
const CesiumGeospatial::Ellipsoid &ellipsoid  CESIUM_DEFAULT_ELLIPSOID 
)

Estimates the bounding CesiumGeospatial::GlobeRectangle of the given BoundingVolume.

Parameters
boundingVolumeThe bounding volume.
ellipsoidThe ellipsoid to use for globe calculations.
Returns
The bounding CesiumGeospatial::GlobeRectangle.

◆ getBoundingRegionFromBoundingVolume()

const CesiumGeospatial::BoundingRegion* Cesium3DTilesSelection::getBoundingRegionFromBoundingVolume ( const BoundingVolume boundingVolume)

Returns the bounding region if the bounding volume is a BoundingRegion or a BoundingRegionWithLooseFittingHeights.

Parameters
boundingVolumeThe bounding volume.
Returns
A pointer to the bounding region, or nullptr is the bounding volume is not a bounding region.

◆ getBoundingVolumeCenter()

glm::dvec3 Cesium3DTilesSelection::getBoundingVolumeCenter ( const BoundingVolume boundingVolume)

Returns the center of the given BoundingVolume.

Parameters
boundingVolumeThe bounding volume.
Returns
The center point.

◆ getOrientedBoundingBoxFromBoundingVolume()

CesiumGeometry::OrientedBoundingBox Cesium3DTilesSelection::getOrientedBoundingBoxFromBoundingVolume ( const BoundingVolume boundingVolume,
const CesiumGeospatial::Ellipsoid &ellipsoid  CESIUM_DEFAULT_ELLIPSOID 
)

Returns an oriented bounding box that contains the given BoundingVolume.

Parameters
boundingVolumeThe bounding volume.
Returns
The oriented bounding box.

◆ transformBoundingVolume()

BoundingVolume Cesium3DTilesSelection::transformBoundingVolume ( const glm::dmat4x4 &  transform,
const BoundingVolume boundingVolume 
)

Transform the given BoundingVolume with the given matrix.

If the given bounding volume is a CesiumGeometry::BoundingSphere or CesiumGeometry::OrientedBoundingBox, then it will be transformed with the given matrix. Bounding regions will not be transformed.

Parameters
transformThe transform matrix.
boundingVolumeThe bounding volume.
Returns
The transformed bounding volume.