class ARDeviceMappingManager
(Niantic.Lightship.AR.Mapping.ARDeviceMappingManager)
Overview
ARDeviceMappingManager can be used to generate device map and set the device map to track
class ARDeviceMappingManager: MonoBehaviour {
public:
// properties
DeviceMapAccessController DeviceMapAccessController;
DeviceMappingController DeviceMappingController;
ARDeviceMap ARDeviceMap;
uint MappingTargetFrameRate;
float MappingSplitterMaxDistanceMeters;
float MappingSplitterMaxDurationSeconds;
bool IsMappingInProgress;
// events
event DeviceMapUpdated();
event DeviceMapFinalized();
// methods
IEnumerator RestartModuleAsyncCoroutine();
void StartMapping();
void StopMapping();
void SetDeviceMap(ARDeviceMap arDeviceMap);
void ExtractMapMetadata(
out Vector3[] points,
out float[] errors,
out Vector3 center,
out string mapType
);
};
Detailed Documentation
ARDeviceMappingManager can be used to generate device map and set the device map to track
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Properties
DeviceMapAccessController
DeviceMapAccessController DeviceMapAccessController
Get DeviceMapAccessController, which provides primitive access to the device map and related info
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
DeviceMappingController
DeviceMappingController DeviceMappingController
Get DeviceMappingController, which provides primitive API for device mapping
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
ARDeviceMap
ARDeviceMap ARDeviceMap
Get the ARDeviceMap object in this manager
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
MappingTargetFrameRate
uint MappingTargetFrameRate
Property access for mapping speed
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
MappingSplitterMaxDistanceMeters
float MappingSplitterMaxDistanceMeters
Property access for map splitting criteria by distance
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
MappingSplitterMaxDurationSeconds
float MappingSplitterMaxDurationSeconds
Property access for map splitting criteria by time
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
IsMappingInProgress
bool IsMappingInProgress
A state if mapping is in progress or not. True is mapping is ongoing. Becomes false after calling StopMapping()
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Events
DeviceMapUpdated
event DeviceMapUpdated()
An event when device map data has been updated
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
DeviceMapFinalized
event DeviceMapFinalized()
An event when device map is finalized and ready to save
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Methods
RestartModuleAsyncCoroutine
IEnumerator RestartModuleAsyncCoroutine()
Asynchronously restarts the underlying module with the current configuration.
StartMapping
void StartMapping()
Start map generation
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
StopMapping
void StopMapping()
Stop map generation
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
SetDeviceMap
void SetDeviceMap(ARDeviceMap arDeviceMap)
Set a Device Map to track. Use when loading a serialized device map and track it.
.. note::
This is an experimental feature, and is subject to breaking changes or deprecation without notice
Parameters:
arDeviceMap
- ARDeviceMap to track
ExtractMapMetadata
void ExtractMapMetadata(
out Vector3[] points,
out float[] errors,
out Vector3 center,
out string mapType
)
Extract map metadata from the currently set device map. Could be used for debugging and/or visual user feedback where map is
Parameters:
points
- feature points coordinates relative to the anchor/map center
errors
- estimated errors of each points. Smaller error points could be more significant feature points
center
- center point coordinates in the mapped coordinate system