CLASS
ArdkMeshDownloader
public final class ArdkMeshDownloader: ArdkSession.IDisposable
A session-scoped utility for downloading mesh geometry associated with VPS locations.
Methods
requestLocationMesh(payload:getTexture:maxDownloadSize:timeout:pollingInterval:)
public func requestLocationMesh(
payload: String,
getTexture: Bool,
maxDownloadSize: UInt32? = nil,
timeout: TimeInterval = 300.0,
pollingInterval: TimeInterval = 0.5
) async throws -> MeshDownloaderResults
Requests all meshes for a VPS location identified by an anchor payload.
Initiates a network request to download all meshes associated with the given VPS location. The call suspends until the operation completes successfully, fails, or times out.
The method automatically polls for completion and returns a MeshDownloaderResults object
containing the downloaded geometry data.
- Parameters:
- payload: The VPS anchor payload string identifying the target location. This can be
obtained from the
blobfield in Geospatial Browser, or thedefault_anchorfield of the VPS Coverage API’sLocalizationTarget. - getTexture: If
true, the response includes mesh texture data; iffalse, the image and UV buffers are empty. Instead, a color field (rgb) will be provided for each vertex. - maxDownloadSize: The optional maximum size (in kilobytes) for meshes to be downloaded.
Meshes larger than this limit are skipped. A value of
nilmeans no size limit. - timeout: The maximum duration to wait for completion (default: 300 seconds).
- pollingInterval: The interval between status checks (default: 0.5 seconds).
- payload: The VPS anchor payload string identifying the target location. This can be
obtained from the
- Returns: A
MeshDownloaderResultsobject containing the downloaded mesh data. - Throws:
CancellationErrorif the Task running this function was cancelled.TimeoutErrorif the function timed out before it could complete execution.ArdkErrorif there was an error with one or more of the arguments. Check ARDK's C logs for more information.
Parameters
| Name | Description |
|---|---|
| payload | The VPS anchor payload string identifying the target location. This can be obtained from the blob field in Geospatial Browser, or the default_anchor field of the VPS Coverage API’s LocalizationTarget. |
| getTexture | If true, the response includes mesh texture data; if false, the image and UV buffers are empty. Instead, a color field (rgb) will be provided for each vertex. |
| maxDownloadSize | The optional maximum size (in kilobytes) for meshes to be downloaded. Meshes larger than this limit are skipped. A value of nil means no size limit. |
| timeout | The maximum duration to wait for completion (default: 300 seconds). |
| pollingInterval | The interval between status checks (default: 0.5 seconds). |