Class: QgsCesiumUtils¶
Contains utilities for working with Cesium data.
Added in version 3.34.
List of all members, including inherited members
Classes
Encapsulates the contents of a B3DM file. |
|
Encapsulates the contents of a 3D tile. |
Static Methods
Extracts GLTF binary data and other contents from the legacy b3dm (Batched 3D Model) tile format. |
|
Parses tile content. |
|
Parses tile content and returns a list of TileContents. |
|
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:
objectEncapsulates the contents of a B3DM file.
- gltf: QByteArray¶
- rtcCenter: QgsVector3D¶
- class TileContents¶
Bases:
objectEncapsulates the contents of a 3D tile.
- gltf: QByteArray¶
- rtcCenter: QgsVector3D¶
- static extractGltfFromB3dm(tileContent: QByteArray | bytes | bytearray | memoryview) 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, memoryview])
- Return type:
- static extractGltfFromTileContent(tileContent: QByteArray | bytes | bytearray | memoryview) QgsCesiumUtils.TileContents[source]¶
Parses tile content. Returns empty byte array on error.
Note
cmpt, pnts, i3dm tile types are currently not supported
Deprecated since version 4.2: : use
extractTileContent()which can handle composite tiles as well.- Parameters:
tileContent (Union[QByteArray, bytes, bytearray, memoryview])
- Return type:
- static extractTileContent(tileContent: QByteArray | bytes | bytearray | memoryview) list[QgsCesiumUtils.TileContents]¶
Parses tile content and returns a list of TileContents.
For b3dm and glTF tiles, the returned list will contain a single entry. For cmpt (composite) tiles, the returned list will contain one entry per inner tile that could be successfully parsed. Returns an empty list on error or for unsupported tile types (pnts, i3dm).
Added in version 4.2.
- Parameters:
tileContent (Union[QByteArray, bytes, bytearray, memoryview])
- Return type:
- static parseBox(box: Iterable[Any]) QgsOrientedBox3D[source]¶
Parses a
boxobject 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
regionobject from a Cesium JSON document to a 3D box.
- static parseSphere(sphere: Iterable[Any]) QgsSphere[source]¶
Parses a
sphereobject from a Cesium JSON document.
- static transformSphere(sphere: QgsSphere, transform: QgsMatrix4x4) QgsSphere[source]¶
Applies a
transformto a sphere.- Parameters:
sphere (QgsSphere)
transform (QgsMatrix4x4)
- Return type: