NSDKMeshDownloader
A session-scoped utility for downloading mesh geometry associated with VPS locations.
Declaration
final class NSDKMeshDownloaderProperties
| Name | Type | Summary |
|---|---|---|
| static let defaultMaxDecodedSizeKb | UInt32 |
Methods
| Name | Type | Summary |
|---|---|---|
| configure | void | Configures the on-disk mesh cache. Downloaded geometry and textures are cached per graph node, so revisiting a location reads from disk instead of the CDN, and an interrupted download resumes where it stopped rather than starting over. Cached content never goes stale: a re-run of the mapping pipeline publishes new node ids, so an id always names the same geometry. Caching is off until this is called. It may be called again later. A changed budget applies at once, to downloads already in progress too. Disabling only affects downloads started afterward; one already in progress keeps the cache it started with. |
| requestLocationMesh | MeshDownloaderResults | [Deprecated] 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 objectcontaining the downloaded geometry data. |
| requestLocationMeshByAsset | AsyncThrowingStream<MeshDownloaderChunk, any Error> | Downloads mesh chunks for a portal asset, streaming each chunk as it completes. Initiates a network request to the portal API for the given vpsMapAssetId. Graph nodes aresorted by proximity to the provided GPS position and downloaded sequentially, closest first. Each decoded chunk is yielded to the returned stream immediately upon completion, enabling incremental mesh generation without waiting for the full download. |
Nested Types
Structs
| Name | Type | Summary |
|---|---|---|
| Configuration | Configuration | Settings for the mesh downloader's on-disk cache. Downloaded geometry and textures are cached per graph node, so revisiting a location reads from disk instead of the CDN, and an interrupted download resumes where it stopped rather than starting over. Cached content never goes stale: a re-run of the mapping pipeline publishes new node ids, so an id always names the same geometry. Caching is off by default. A downloader acquired without it does not read, write, or delete anything in the cache directory, so enabling caching in one session and not the next leaves previously cached data intact. |
Relationships
conforms to: Swift.Sendable
conforms to: Swift.SendableMetatype
maxDecodedSizeKbofrequestLocationMeshByAsset(vpsMapAssetId:latitude:longitude:getTexture:maxChunks:maxSizeKb:maxDecodedSizeKb:pollingInterval:),sized for phones.