cesium-native 0.44.2
Loading...
Searching...
No Matches
Cesium3DTiles::Tileset Struct Reference

This class is not meant to be instantiated directly. Use Tileset instead. More...

#include <Cesium3DTiles/Tileset.h>

Inheritance diagram for Cesium3DTiles::Tileset:
Cesium3DTiles::TilesetSpec CesiumUtility::ExtensibleObject

Public Types

typedef void ForEachTileCallback(Tileset &tileset, Tile &tile, const glm::dmat4 &transform)
 A callback function for forEachTile.
 
typedef void ForEachTileConstCallback(const Tileset &tileset, const Tile &tile, const glm::dmat4 &transform)
 A callback function for forEachTile.
 
typedef void ForEachContentCallback(Tileset &tileset, Tile &tile, Content &content, const glm::dmat4 &transform)
 A callback function for forEachContent.
 
typedef void ForEachContentConstCallback(const Tileset &tileset, const Tile &tile, const Content &content, const glm::dmat4 &transform)
 A callback function for forEachContent.
 

Public Member Functions

void forEachTile (std::function< ForEachTileCallback > &&callback)
 Apply the given callback to all tiles.
 
void forEachTile (std::function< ForEachTileConstCallback > &&callback) const
 Apply the given callback to all tiles.
 
void forEachContent (std::function< ForEachContentCallback > &&callback)
 Apply the given callback to all contents.
 
void forEachContent (std::function< ForEachContentConstCallback > &&callback) const
 Apply the given callback to all contents.
 
void addExtensionUsed (const std::string &extensionName)
 Adds an extension to the TilesetSpec::extensionsUsed property, if it is not already present.
 
void addExtensionRequired (const std::string &extensionName)
 Adds an extension to the TilesetSpec::extensionsRequired property, if it is not already present.
 
void removeExtensionUsed (const std::string &extensionName)
 Removes an extension from the TilesetSpec::extensionsUsed property.
 
void removeExtensionRequired (const std::string &extensionName)
 Removes an extension from the TilesetSpec::extensionsRequired property.
 
bool isExtensionUsed (const std::string &extensionName) const noexcept
 Determines whether a given extension name is listed in the tileset's TilesetSpec::extensionsUsed property.
 
bool isExtensionRequired (const std::string &extensionName) const noexcept
 Determines whether a given extension name is listed in the tileset's TilesetSpec::extensionsRequired property.
 
- Public Member Functions inherited from Cesium3DTiles::TilesetSpec
int64_t getSizeBytes () const
 Calculates the size in bytes of this object, including the contents of all collections, pointers, and strings. This will NOT include the size of any extensions attached to the object. Calling this method may be slow as it requires traversing the object's entire structure.
 
- Public Member Functions inherited from CesiumUtility::ExtensibleObject
template<typename T >
bool hasExtension () const noexcept
 Checks if an extension exists given its static type.
 
template<typename T >
const T * getExtension () const noexcept
 Gets an extension given its static type.
 
template<typename T >
T * getExtension () noexcept
 Gets an extension given its static type.
 
const JsonValuegetGenericExtension (const std::string &extensionName) const noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
JsonValuegetGenericExtension (const std::string &extensionName) noexcept
 Gets a generic extension with the given name as a CesiumUtility::JsonValue.
 
template<typename T , typename... ConstructorArgumentTypes>
T & addExtension (ConstructorArgumentTypes &&... constructorArguments)
 Adds a statically-typed extension to this object.
 
template<typename T >
void removeExtension ()
 Removes a statically-typed extension from this object.
 
int64_t getSizeBytes () const
 Calculates the size in bytes of this ExtensibleObject, including all of its extras but NOT including its extensions. Calling this method may be slow as it requires traversing the entire object.
 

Additional Inherited Members

- Public Attributes inherited from Cesium3DTiles::TilesetSpec
Cesium3DTiles::Asset asset
 Metadata about the entire tileset.
 
std::unordered_map< std::string, Cesium3DTiles::Propertiesproperties
 A dictionary object of metadata about per-feature properties.
 
std::optional< Cesium3DTiles::Schemaschema
 An object defining the structure of metadata classes and enums. When this is defined, then schemaUri shall be undefined.
 
std::optional< std::string > schemaUri
 The URI (or IRI) of the external schema file. When this is defined, then schema shall be undefined.
 
std::optional< Cesium3DTiles::Statisticsstatistics
 An object containing statistics about metadata entities.
 
std::vector< Cesium3DTiles::GroupMetadatagroups
 An array of groups that tile content may belong to. Each element of this array is a metadata entity that describes the group. The tile content group property is an index into this array.
 
std::optional< Cesium3DTiles::MetadataEntitymetadata
 A metadata entity that is associated with this tileset.
 
double geometricError = double()
 The error, in meters, introduced if this tileset is not rendered. At runtime, the geometric error is used to compute screen space error (SSE), i.e., the error measured in pixels.
 
Cesium3DTiles::Tile root
 The root tile.
 
std::vector< std::string > extensionsUsed
 Names of 3D Tiles extensions used somewhere in this tileset.
 
std::vector< std::string > extensionsRequired
 Names of 3D Tiles extensions required to properly load this tileset. Each element of this array shall also be contained in extensionsUsed.
 
- Public Attributes inherited from CesiumUtility::ExtensibleObject
std::unordered_map< std::string, std::any > extensions
 The extensions attached to this object.
 
JsonValue::Object extras
 Application-specific data.
 
JsonValue::Object unknownProperties
 Unknown properties that exist on this object but do not have any representation in the statically-typed classes.
 
- Static Public Attributes inherited from Cesium3DTiles::TilesetSpec
static constexpr const char * TypeName = "Tileset"
 The original name of this type.
 
- Protected Member Functions inherited from Cesium3DTiles::TilesetSpec
 TilesetSpec ()=default
 This class is not meant to be instantiated directly. Use Tileset instead.
 

Detailed Description

This class is not meant to be instantiated directly. Use Tileset instead.

Definition at line 13 of file Tileset.h.

Member Typedef Documentation

◆ ForEachContentCallback

void Cesium3DTiles::Tileset::ForEachContentCallback(Tileset &tileset, Tile &tile, Content &content, const glm::dmat4 &transform)

A callback function for forEachContent.

Definition at line 48 of file Tileset.h.

◆ ForEachContentConstCallback

void Cesium3DTiles::Tileset::ForEachContentConstCallback(const Tileset &tileset, const Tile &tile, const Content &content, const glm::dmat4 &transform)

A callback function for forEachContent.

Definition at line 67 of file Tileset.h.

◆ ForEachTileCallback

void Cesium3DTiles::Tileset::ForEachTileCallback(Tileset &tileset, Tile &tile, const glm::dmat4 &transform)

A callback function for forEachTile.

Definition at line 19 of file Tileset.h.

◆ ForEachTileConstCallback

void Cesium3DTiles::Tileset::ForEachTileConstCallback(const Tileset &tileset, const Tile &tile, const glm::dmat4 &transform)

A callback function for forEachTile.

Definition at line 37 of file Tileset.h.

Member Function Documentation

◆ addExtensionRequired()

void Cesium3DTiles::Tileset::addExtensionRequired ( const std::string & extensionName)

Adds an extension to the TilesetSpec::extensionsRequired property, if it is not already present.

Calling this function also adds the extension to extensionsUsed, if it's not already present.

Parameters
extensionNameThe name of the required extension.

◆ addExtensionUsed()

void Cesium3DTiles::Tileset::addExtensionUsed ( const std::string & extensionName)

Adds an extension to the TilesetSpec::extensionsUsed property, if it is not already present.

Parameters
extensionNameThe name of the used extension.

◆ forEachContent() [1/2]

void Cesium3DTiles::Tileset::forEachContent ( std::function< ForEachContentCallback > && callback)

Apply the given callback to all contents.

This will only invoke the callback for contents of explicit tiles. It won't follow external tilesets or implicit tiles.

Parameters
callbackThe callback to apply

◆ forEachContent() [2/2]

void Cesium3DTiles::Tileset::forEachContent ( std::function< ForEachContentConstCallback > && callback) const

Apply the given callback to all contents.

This will only invoke the callback for contents of explicit tiles. It won't follow external tilesets or implicit tiles.

Parameters
callbackThe callback to apply

◆ forEachTile() [1/2]

void Cesium3DTiles::Tileset::forEachTile ( std::function< ForEachTileCallback > && callback)

Apply the given callback to all tiles.

This will only invoke the callback for explicit tiles. It won't follow external tilesets or implicit tiles.

Parameters
callbackThe callback to apply

◆ forEachTile() [2/2]

void Cesium3DTiles::Tileset::forEachTile ( std::function< ForEachTileConstCallback > && callback) const

Apply the given callback to all tiles.

This will only invoke the callback for explicit tiles. It won't follow external tilesets or implicit tiles.

Parameters
callbackThe callback to apply

◆ isExtensionRequired()

bool Cesium3DTiles::Tileset::isExtensionRequired ( const std::string & extensionName) const
noexcept

Determines whether a given extension name is listed in the tileset's TilesetSpec::extensionsRequired property.

Parameters
extensionNameThe extension name to check.
Returns
True if the extension is found in extensionsRequired; otherwise, false.

◆ isExtensionUsed()

bool Cesium3DTiles::Tileset::isExtensionUsed ( const std::string & extensionName) const
noexcept

Determines whether a given extension name is listed in the tileset's TilesetSpec::extensionsUsed property.

Parameters
extensionNameThe extension name to check.
Returns
True if the extension is found in extensionsUsed; otherwise, false.

◆ removeExtensionRequired()

void Cesium3DTiles::Tileset::removeExtensionRequired ( const std::string & extensionName)

Removes an extension from the TilesetSpec::extensionsRequired property.

Calling this function also removes the extension from extensionsUsed.

Parameters
extensionNameThe name of the required extension.

◆ removeExtensionUsed()

void Cesium3DTiles::Tileset::removeExtensionUsed ( const std::string & extensionName)

Removes an extension from the TilesetSpec::extensionsUsed property.

Parameters
extensionNameThe name of the used extension.

The documentation for this struct was generated from the following file: