Class: QgsCesiumUtils¶
Contains utilities for working with Cesium data.
Added in version 3.34.
Static Methods
Extracts GLTF binary data and other contents from the legacy b3dm (Batched 3D Model) tile format. |
|
Parses tile content. |
|
Parses a box object from a Cesium JSON document to an oriented bounding box. |
|
Parses a region object from a Cesium JSON document to a 3D box. |
|
Parses a sphere object from a Cesium JSON document. |
|
Applies a transform to a sphere. |
- class qgis.core.QgsCesiumUtils[source]¶
Bases:
object
- class B3DMContents¶
Bases:
object
Encapsulates the contents of a B3DM file.
- gltf: QByteArray¶
GLTF binary content
- rtcCenter: QgsVector3D¶
Optional RTC center
- class TileContents¶
Bases:
object
Encapsulates the contents of a 3D tile.
- gltf: QByteArray¶
GLTF binary content
- rtcCenter: QgsVector3D¶
Center position of relative-to-center coordinates (when used)
- static extractGltfFromB3dm(tileContent: QByteArray | bytes | bytearray) QgsCesiumUtils.B3DMContents [source]¶
Extracts GLTF binary data and other contents from the legacy b3dm (Batched 3D Model) tile format. Returns empty byte array on error.
- Parameters:
tileContent (Union[QByteArray, bytes, bytearray])
- Return type:
- static extractGltfFromTileContent(tileContent: QByteArray | bytes | bytearray) QgsCesiumUtils.TileContents [source]¶
Parses tile content. Returns empty byte array on error.
Note
cmpt, pnts, i3dm tile types are currently not supported
- Parameters:
tileContent (Union[QByteArray, bytes, bytearray])
- Return type:
- static parseBox(box: Iterable[Any]) QgsOrientedBox3D [source]¶
Parses a
box
object from a Cesium JSON document to an oriented bounding box.- Parameters:
box (Iterable[Any])
- Return type:
- static parseRegion(region: Iterable[Any]) QgsBox3D [source]¶
Parses a
region
object from a Cesium JSON document to a 3D box.- Parameters:
region (Iterable[Any])
- Return type:
- static parseSphere(sphere: Iterable[Any]) QgsSphere [source]¶
Parses a
sphere
object from a Cesium JSON document.- Parameters:
sphere (Iterable[Any])
- Return type:
- static transformSphere(sphere: QgsSphere, transform: QgsMatrix4x4) QgsSphere [source]¶
Applies a
transform
to a sphere.- Parameters:
sphere (QgsSphere)
transform (QgsMatrix4x4)
- Return type: