cesium-native
0.41.0
|
Reads 3D Tiles subtrees from a binary or JSON subtree file. More...
#include <Cesium3DTilesReader/SubtreeFileReader.h>
Public Member Functions | |
SubtreeFileReader () | |
Constructs a new instance. | |
CesiumJsonReader::JsonReaderOptions & | getOptions () |
Gets the options controlling how the JSON is read. | |
const CesiumJsonReader::JsonReaderOptions & | getOptions () const |
Gets the options controlling how the JSON is read. | |
CesiumAsync::Future< CesiumJsonReader::ReadJsonResult< Cesium3DTiles::Subtree > > | load (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers={}) const noexcept |
Asynchronously loads a subtree from a URL. More... | |
CesiumAsync::Future< CesiumJsonReader::ReadJsonResult< Cesium3DTiles::Subtree > > | load (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::shared_ptr< CesiumAsync::IAssetRequest > &pRequest) const noexcept |
CesiumAsync::Future< CesiumJsonReader::ReadJsonResult< Cesium3DTiles::Subtree > > | load (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &requestHeaders, const gsl::span< const std::byte > &data) const noexcept |
Reads 3D Tiles subtrees from a binary or JSON subtree file.
While SubtreeReader can parse a Subtree from a binary buffer as well, SubtreeFileReader
additionally supports:
The subtree file need not be an actual file on disk.
Definition at line 23 of file SubtreeFileReader.h.
|
noexcept |
Asynchronously loads a subtree from a URL.
Please note that the SubtreeFileReader
instance must remain valid until the returned future resolves or rejects. Destroying it earlier will result in undefined behavior. One easy way to achieve this is to construct the reader with std::make_shared
and capture the std::shared_ptr
in the continuation lambda.
asyncSystem | The AsyncSystem used to do asynchronous work. |
pAssetAccessor | The accessor used to retrieve the URL and any other required resources. |
url | The URL from which to get the subtree file. |
headers | Headers to include in the request for the initial subtree file and any additional resources that are required. |