MeshingSession
↳ extends SessionBase
A session for real-time 3D mesh generation from AR data. 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.
Declaration
class MeshingSessionProperties
| Name | Type | Summary |
|---|---|---|
| ardkHandle | Long | - |
| meshUpdates | Flow<MeshingUpdateInfo?> | Flow of mesh updates. The Flow emits [MeshingUpdateInfo] whenever the mesh update timestamp changes, indicating that mesh chunks have been updated. The value may be null if there are no chunks available. Warning: Do not use this Flow together with manually calling [getUpdatedInfos]. The Flow internally polls this method, and mixing manual calls with the Flow can cause updates to desynchronize. This happens because calling [getData] resets the updated flag for mesh chunks, so depending on which side calls [getData] first, the other side may miss updates or receive stale data. Use either the Flow API or the manual polling methods, but not both. |
| pollingIntervalMs | Long | - |
Functions
| Name | Type | Summary |
|---|---|---|
| configure | void | Configures the meshing feature with the specified settings. > Note: 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. |
| featureStatus | FeatureStatus | Reports errors that have occurred with 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. |
| getData | MeshData? | Gets the data for a single mesh chunk. Calling this function will reset the updated flag for the mesh chunk; i.e. after calling this function, future calls of [getUpdatedInfos] will only mark the chunk with id as having updated if its mesh data has changed since the call to this function. |
| getLastUpdateTime | Long? | Gets the timestamp of the latest mesh update. |
| getUpdatedInfos | MeshingUpdateInfo? | 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 [getData]. |
| onDestroy | void | - |
| onInit | void | - |
| start | void | Starts the meshing feature. The feature will begin processing input data and building a mesh according to the configuration. |
| stop | void | Stops the meshing feature. > Note: This will clear the mesh data. |