cesium-native  0.41.0
CesiumGltfReader::NetworkImageAssetDescriptor Struct Reference

A description of an image asset that can be loaded from the network using an IAssetAccessor. This includes a URL, any headers to be included in the request, and the set of supported GPU texture formats for KTX2 decoding. More...

#include <CesiumGltfReader/NetworkImageAssetDescriptor.h>

Inheritance diagram for CesiumGltfReader::NetworkImageAssetDescriptor:
CesiumAsync::NetworkAssetDescriptor

Public Member Functions

bool operator== (const NetworkImageAssetDescriptor &rhs) const noexcept
 Determines if this descriptor is identical to another one.
 
CesiumAsync::Future< CesiumUtility::ResultPointer< CesiumGltf::ImageAsset > > load (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< CesiumAsync::IAssetAccessor > &pAssetAccessor) const
 Request this asset from the network using the provided asset accessor and return the loaded ImageAsset. More...
 
- Public Member Functions inherited from CesiumAsync::NetworkAssetDescriptor
bool operator== (const NetworkAssetDescriptor &rhs) const noexcept
 Determines if this descriptor is identical to another one.
 
Future< std::shared_ptr< CesiumAsync::IAssetRequest > > loadFromNetwork (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< IAssetAccessor > &pAssetAccessor) const
 Request this asset from the network using the provided asset accessor. More...
 
Future< CesiumUtility::Result< std::vector< std::byte > > > loadBytesFromNetwork (const CesiumAsync::AsyncSystem &asyncSystem, const std::shared_ptr< IAssetAccessor > &pAssetAccessor) const
 Request this asset from the network using the provided asset accessor and return the downloaded bytes. More...
 

Public Attributes

CesiumGltf::Ktx2TranscodeTargets ktx2TranscodeTargets {}
 The supported GPU texture formats used for KTX2 decoding.
 
- Public Attributes inherited from CesiumAsync::NetworkAssetDescriptor
std::string url
 The URL from which this network asset is downloaded.
 
std::vector< IAssetAccessor::THeaderheaders
 The HTTP headers used in requesting this asset.
 

Detailed Description

A description of an image asset that can be loaded from the network using an IAssetAccessor. This includes a URL, any headers to be included in the request, and the set of supported GPU texture formats for KTX2 decoding.

Definition at line 24 of file NetworkImageAssetDescriptor.h.

Member Function Documentation

◆ load()

CesiumAsync::Future<CesiumUtility::ResultPointer<CesiumGltf::ImageAsset> > CesiumGltfReader::NetworkImageAssetDescriptor::load ( const CesiumAsync::AsyncSystem asyncSystem,
const std::shared_ptr< CesiumAsync::IAssetAccessor > &  pAssetAccessor 
) const

Request this asset from the network using the provided asset accessor and return the loaded ImageAsset.

Parameters
asyncSystemThe async system.
pAssetAccessorThe asset accessor.
Returns
A future that resolves to the image asset once the request is complete.

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