NSDKMeshingSession
A session for real-time 3D mesh generation from AR camera frames, with Combine publisher support....
Declaration
final class NSDKMeshingSessionSummary
A session for real-time 3D mesh generation from AR camera frames, with Combine publisher support.
The meshing feature provides capabilities for processing AR session data and generating
a triangle mesh representation of the physical environment in real-time. The mesh is
divided into chunks that are individually tracked as they are inserted, updated, or removed.
meshUpdates emits each frame a non-empty batch of chunk changes is available, driven by
NSDKSession.update() while the session is active. Subscribe to it with Combine:
meshingSession.meshUpdates
.sink { updates in ... }
.store(in: &cancellables)
Properties
| Name | Type | Summary |
|---|---|---|
| let meshUpdates | PassthroughSubject<[NSDKMeshingSession.MeshChunkUpdate], Never> |
Methods
| Name | Type | Summary |
|---|---|---|
| configure | void | Configures the meshing feature with the specified settings. - Attention: If this method is called while meshing is running, the meshing feature will restart with the new configuration, and any mesh data that has been produced will be lost. - Parameter config: An object that defines the meshing behavior. - Throws: NSDKError.invalidArgument if the configuration is invalid.Check NSDK's C logs for more information. |
| featureStatus | NSDKFeatureStatus | Reports the current status of the meshing session. Check this periodically to see if any errors have occurred with processes running inside this feature. Once an error has been flagged, it will remain flagged until the culprit process has been run again and completed successfully. - Returns: A flag indicating the current status of the meshing session. |
| start | void | Starts the meshing feature. The feature will begin processing AR frame data and building a mesh according to the currently applied configuration. |
| stop | void | Stops the meshing feature. - Note: This will clear previously generated mesh data. |
Nested Types
Structs
| Name | Type | Summary |
|---|---|---|
| Configuration | Configuration | The type of configuration used by this session |
Enums
| Name | Type | Summary |
|---|---|---|
| MeshChunkUpdate | MeshChunkUpdate | Describes a change to a specific mesh chunk. Each case represents how a chunk identified by id should be handled:- insert: A new chunk should be added.- update: An existing chunk has new mesh data.- remove: A chunk should be removed. |
Relationships
conforms to: NSDKFeatureSession
Each emission contains a non-empty array of chunk insertions, updates, and removals
since the previous frame. Frames with no mesh changes produce no emission.