Reads glTF models and images.
More...
#include <CesiumGltfReader/GltfReader.h>
|
|
| GltfReader () |
| | Constructs a new instance.
|
| |
|
CesiumJsonReader::JsonReaderOptions & | getOptions () |
| | Gets the options controlling how the JSON is read.
|
| |
|
const CesiumJsonReader::JsonReaderOptions & | getExtensions () const |
| | Gets the options controlling how the JSON is read.
|
| |
| GltfReaderResult | readGltf (const std::span< const std::byte > &data, const GltfReaderOptions &options=GltfReaderOptions()) const |
| | Reads a glTF or binary glTF (GLB) from a buffer.
|
| |
| CesiumAsync::Future< GltfReaderResult > | readGltfAndExternalData (const std::span< const std::byte > &data, const CesiumAsync::AsyncSystem &asyncSystem, const CesiumAsync::HttpHeaders &headers, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::string &baseUrl={}, const GltfReaderOptions &options=GltfReaderOptions()) const |
| | Read a glTF or binary glTF (GLB) from a buffer and then resolve external references.
|
| |
| CesiumAsync::Future< GltfReaderResult > | readGltfAndExternalData (const std::span< const std::byte > &data, const CesiumAsync::AsyncSystem &asyncSystem, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::string &baseUrl={}, const GltfReaderOptions &options=GltfReaderOptions()) const |
| | Read a glTF or binary glTF (GLB) from a buffer and then resolve external references.
|
| |
| CesiumAsync::Future< GltfReaderResult > | loadGltf (const CesiumAsync::AsyncSystem &asyncSystem, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const GltfReaderOptions &options=GltfReaderOptions()) const |
| | Reads a glTF or binary glTF file from a URL and resolves external buffers and images.
|
| |
| void | postprocessGltf (GltfReaderResult &readGltf, const GltfReaderOptions &options) |
| | Performs post-load processing on a glTF. The specific operations performed are controlled by the provided options.
|
| |
Reads glTF models and images.
Definition at line 128 of file GltfReader.h.
◆ generateMipMaps()
| static std::optional< std::string > CesiumGltfReader::GltfReader::generateMipMaps |
( |
CesiumGltf::ImageAsset & | image | ) |
|
|
static |
◆ loadGltf()
Reads a glTF or binary glTF file from a URL and resolves external buffers and images.
- Parameters
-
| asyncSystem | The async system to use for resolving external data. |
| url | The url for reading the file. |
| headers | http headers needed to make the request. |
| pAssetAccessor | The asset accessor to use to make the necessary requests. |
| options | Options for how to read the glTF. |
◆ postprocessGltf()
Performs post-load processing on a glTF. The specific operations performed are controlled by the provided options.
- Parameters
-
| readGltf | The result of reading the glTF. |
| options | The options to use in post-processing. |
◆ readGltf()
Reads a glTF or binary glTF (GLB) from a buffer.
- Parameters
-
| data | The buffer from which to read the glTF. |
| options | Options for how to read the glTF. |
- Returns
- The result of reading the glTF.
◆ readGltfAndExternalData() [1/2]
Read a glTF or binary glTF (GLB) from a buffer and then resolve external references.
- Parameters
-
| data | The data bytes of the glTF file |
| asyncSystem | The async system to use for resolving external data. |
| headers | http headers needed to make the request. |
| pAssetAccessor | The asset accessor to use to make the necessary requests. |
| baseUrl | The url to which all external urls are relative |
| options | Options for how to read the glTF. |
◆ readGltfAndExternalData() [2/2]
Read a glTF or binary glTF (GLB) from a buffer and then resolve external references.
- Parameters
-
| data | The data bytes of the glTF file |
| asyncSystem | The async system to use for resolving external data. |
| headers | http headers needed to make the request. |
| pAssetAccessor | The asset accessor to use to make the necessary requests. |
| baseUrl | The url to which all external urls are relative |
| options | Options for how to read the glTF. |
◆ readImage()
◆ resolveExternalData()
Accepts the result of readGltf and resolves any remaining external buffers and images.
- Parameters
-
| asyncSystem | The async system to use for resolving external data. |
| baseUrl | The base url that all the external uris are relative to. |
| headers | The http headers needed to make any external data requests. |
| pAssetAccessor | The asset accessor to use to request the external buffers and images. |
| options | Options for how to read the glTF. |
| result | The result of the synchronous readGltf invocation. |
The documentation for this class was generated from the following file:
- /home/runner/work/cesium-native/cesium-native/CesiumGltfReader/include/CesiumGltfReader/GltfReader.h