cesium-native 0.43.0
Loading...
Searching...
No Matches
CesiumGltfContent::SkirtMeshMetadata Struct Reference

Metadata obtained from a glTF that describes the skirts present on the mesh. More...

#include <CesiumGltfContent/SkirtMeshMetadata.h>

Public Member Functions

 SkirtMeshMetadata () noexcept
 Creates a new SkirtMeshMetadata with zeroes in all fields.
 

Static Public Member Functions

static std::optional< SkirtMeshMetadataparseFromGltfExtras (const CesiumUtility::JsonValue::Object &extras)
 Parses SkirtMeshMetadata from the extras field of a glTF mesh, if present.
 
static CesiumUtility::JsonValue::Object createGltfExtras (const SkirtMeshMetadata &skirt)
 Creates a glTF mesh extras value from the provided SkirtMeshMetadata.
 

Public Attributes

uint32_t noSkirtIndicesBegin
 The start index of the range of a glTF mesh's indices buffer that should NOT be considered part of the skirt.
 
uint32_t noSkirtIndicesCount
 The length of the range of a glTF mesh's indices buffer that should NOT be considered part of the skirt.
 
uint32_t noSkirtVerticesBegin
 The start index of the range of a glTF mesh's vertices buffer that should NOT be considered part of the skirt.
 
uint32_t noSkirtVerticesCount
 The length of the range of a glTF mesh's vertices buffer that should NOT be considered part of the skirt.
 
glm::dvec3 meshCenter
 The center coordinates of the mesh, in Earth-Centered, Earth-Fixed Coordinates (ECEF).
 
double skirtWestHeight
 The height of the skirt on the western edge of the mesh.
 
double skirtSouthHeight
 The height of the skirt on the southern edge of the mesh.
 
double skirtEastHeight
 The height of the skirt on the eastern edge of the mesh.
 
double skirtNorthHeight
 The height of the skirt on the northern edge of the mesh.
 

Detailed Description

Metadata obtained from a glTF that describes the skirts present on the mesh.

Remarks
Skirts are a technique for hiding cracks between adjacent tiles where the geometry at the edges of tiles is extended downwards, like the edges of a tablecloth hanging off of a table. These skirts are included in the glTF when they're generated, in the case of 3D Tiles, or they are generated by Cesium Native when terrain is loaded, in the case of Quantized Mesh terrain. SkirtMeshMetadata is attached to the glTF to allow Cesium Native to know which parts of the mesh are original and which contain the generated skirts, for operations such as creating texture coordinates for raster overlays.

Definition at line 23 of file SkirtMeshMetadata.h.

Constructor & Destructor Documentation

◆ SkirtMeshMetadata()

CesiumGltfContent::SkirtMeshMetadata::SkirtMeshMetadata ( )
inlinenoexcept

Creates a new SkirtMeshMetadata with zeroes in all fields.

Definition at line 27 of file SkirtMeshMetadata.h.

Member Function Documentation

◆ createGltfExtras()

static CesiumUtility::JsonValue::Object CesiumGltfContent::SkirtMeshMetadata::createGltfExtras ( const SkirtMeshMetadata & skirt)
static

Creates a glTF mesh extras value from the provided SkirtMeshMetadata.

This might be used when generating a glTF at runtime, in order to provide information on the mesh's skirts to the rest of Cesium Native.

Parameters
skirtThe skirt to create the glTF extras object from.
Returns
An object representing the value of a glTF extras field containing the skirt metadata.

◆ parseFromGltfExtras()

static std::optional< SkirtMeshMetadata > CesiumGltfContent::SkirtMeshMetadata::parseFromGltfExtras ( const CesiumUtility::JsonValue::Object & extras)
static

Parses SkirtMeshMetadata from the extras field of a glTF mesh, if present.

Parameters
extrasThe extras field of the glTF mesh.
Returns
An optional containing the SkirtMeshMetadata if it was present on the mesh.

Member Data Documentation

◆ meshCenter

glm::dvec3 CesiumGltfContent::SkirtMeshMetadata::meshCenter

The center coordinates of the mesh, in Earth-Centered, Earth-Fixed Coordinates (ECEF).

Definition at line 94 of file SkirtMeshMetadata.h.

◆ noSkirtIndicesBegin

uint32_t CesiumGltfContent::SkirtMeshMetadata::noSkirtIndicesBegin

The start index of the range of a glTF mesh's indices buffer that should NOT be considered part of the skirt.

Definition at line 67 of file SkirtMeshMetadata.h.

◆ noSkirtIndicesCount

uint32_t CesiumGltfContent::SkirtMeshMetadata::noSkirtIndicesCount

The length of the range of a glTF mesh's indices buffer that should NOT be considered part of the skirt.

Any indices outside of the range (noSkirtIndicesBegin, noSkirtIndicesBegin + noSkirtIndicesCount) will be considered part of the skirt.

Definition at line 76 of file SkirtMeshMetadata.h.

◆ noSkirtVerticesBegin

uint32_t CesiumGltfContent::SkirtMeshMetadata::noSkirtVerticesBegin

The start index of the range of a glTF mesh's vertices buffer that should NOT be considered part of the skirt.

Definition at line 81 of file SkirtMeshMetadata.h.

◆ noSkirtVerticesCount

uint32_t CesiumGltfContent::SkirtMeshMetadata::noSkirtVerticesCount

The length of the range of a glTF mesh's vertices buffer that should NOT be considered part of the skirt.

Any vertices outside of the range (noSkirtVerticesBegin, noSkirtVerticesBegin + noSkirtVerticesCount) will be considered part of the skirt.

Definition at line 90 of file SkirtMeshMetadata.h.

◆ skirtEastHeight

double CesiumGltfContent::SkirtMeshMetadata::skirtEastHeight

The height of the skirt on the eastern edge of the mesh.

Definition at line 106 of file SkirtMeshMetadata.h.

◆ skirtNorthHeight

double CesiumGltfContent::SkirtMeshMetadata::skirtNorthHeight

The height of the skirt on the northern edge of the mesh.

Definition at line 110 of file SkirtMeshMetadata.h.

◆ skirtSouthHeight

double CesiumGltfContent::SkirtMeshMetadata::skirtSouthHeight

The height of the skirt on the southern edge of the mesh.

Definition at line 102 of file SkirtMeshMetadata.h.

◆ skirtWestHeight

double CesiumGltfContent::SkirtMeshMetadata::skirtWestHeight

The height of the skirt on the western edge of the mesh.

Definition at line 98 of file SkirtMeshMetadata.h.


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