NsdkMeshingSession
A session for real-time 3D mesh generation from AR camera frames....
Declaration
final class NsdkMeshingSessionSummary
A session for real-time 3D mesh generation from AR camera frames. 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 can be individually queried and updated as the environment is scanned.
Methods
| Name | Type | Summary |
|---|---|---|
| configure | void | |
| featureStatus | NsdkFeatureStatus | Reports errors that have occurred within processes running inside this feature. 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: Feature status flags for any issues that have occurred |
| lastMeshUpdateTime | UInt64? | Gets the timestamp of the latest mesh update. - Returns: The timestamp in milliseconds, or nil if no mesh data has been produced yet. |
| meshDataById | MeshData? | Retrieves the mesh data for a specified chunk. - Note: This method resets the updated flag for the specified chunk. Subsequent calls to updatedMeshInfos() will only mark the chunk as updated if its mesh data haschanged since the mesh chunk's data was last retrieved. - Parameter id: The ID of the mesh chunk to retrieve, obtained from updatedMeshInfos().- Returns: The mesh data for the specified chunk, or nil if no chunk with the given ID exists. |
| 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. |
| updatedMeshInfos | MeshUpdateInfo? | Gets the ids of all chunks in the current mesh and their update status. The returned information contains the ids and update status for all chunks currently in the mesh. If a chunk's updated flag is true, the mesh chunk has been updated since the last time its data was read with meshDataById(id:).To retrieve the data for a specific chunk, call meshDataById(id:).- Returns: A buffer containing updated mesh chunk ids, nil if there are no chunks. |
Nested Types
Structs
| Name | Type | Summary |
|---|---|---|
| Configuration | Configuration | The type of configuration used by this session |
Relationships
conforms to: NsdkFeatureSession
- 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.invalidArgumentif the configuration is invalid.Check NSDK's C logs for more information.