SparseSpatialMapWorkerFrameFilter Class¶
Description¶
MonoBehaviour which controls SparseSpatialMap in the scene, providing a few extensions in the Unity environment. Use SparseSpatialMapWorkerFrameFilter.Builder , SparseSpatialMapWorkerFrameFilter.Localizer or SparseSpatialMapWorkerFrameFilter.Manager directly when necessary.
Enums¶
public enum SparseSpatialMapWorkerFrameFilter.Mode |
Working mode. |
Classes¶
public class SparseSpatialMapWorkerFrameFilter.MapLocalizerConfig |
Map localizer config. |
MonoBehaviour Messages¶
private void Awake() |
private void OnEnable() |
private void OnDisable() |
private void OnDestroy() |
Fields¶
LocalizerConfig¶
- C#
public SparseSpatialMapWorkerFrameFilter.MapLocalizerConfig LocalizerConfig
Map localizer config used before every start ( SparseSpatialMapWorkerFrameFilter.OnEnable ).
LoadTimeout¶
- C#
public int LoadTimeout
Timeout in milliseconds when loading map from server.
HostTimeout¶
- C#
public int HostTimeout
Timeout in milliseconds when uploading map to server.
UseGlobalServiceConfig¶
- C#
public bool UseGlobalServiceConfig
Use global service config or not. The global service config can be changed on the inspector after click Unity menu EasyAR -> Sense -> Configuration.
ServiceConfig¶
- C#
public FixedAddressAPIKeyAccessData ServiceConfig
Service config when SparseSpatialMapWorkerFrameFilter.UseGlobalServiceConfig == false, only valid for this object.
Properties¶
Builder¶
- C#
public SparseSpatialMap Builder { get; }
EasyAR Sense API. Accessible when building map after session ready if available.
Use when building a map ( SparseSpatialMapWorkerFrameFilter.WorkingMode == SparseSpatialMapWorkerFrameFilter.Mode.Build ).
Localizer¶
- C#
public SparseSpatialMap Localizer { get; }
EasyAR Sense API. Accessible after session ready if available.
Use when localizing a map ( SparseSpatialMapWorkerFrameFilter.WorkingMode == SparseSpatialMapWorkerFrameFilter.Mode.Localize ).
Manager¶
- C#
public SparseSpatialMapManager Manager { get; }
EasyAR Sense API. Accessible after session ready if available.
Use when building and uploading a map.
WorkingMode¶
- C#
public SparseSpatialMapWorkerFrameFilter.Mode WorkingMode { get; }
Current working mode. The working mode start as SparseSpatialMapWorkerFrameFilter.Mode.Build and will change to SparseSpatialMapWorkerFrameFilter.Mode.Localize after a map load.
LocalizedMap¶
- C#
public SparseSpatialMapController LocalizedMap { get; }
The map being localized.
BuilderMapController¶
- C#
public SparseSpatialMapController BuilderMapController { get; }
The map controller for map building. To visualize the map building, SparseSpatialMapController.SourceType of one SparseSpatialMapController should be set to SparseSpatialMapController.DataSource.MapBuilder and the map should be loaded before building start.
MapHolder¶
- C#
public SparseSpatialMapHolder MapHolder { get; }
The map holder which holds and manages maps in the scene.
Events¶
MapLoad¶
- C#
public event Action< SparseSpatialMapController , bool, string> MapLoad
Map load finish event. The bool value indicates the load success or not. The string value is the error message when fail.
MapUnload¶
- C#
public event Action< SparseSpatialMapController , bool, string> MapUnload
Map unload finish event. The bool value indicates the unload success or not. The string value is the error message when fail.
Methods¶
Host¶
- C#
public void Host(string name, Optional< Image > preview, Action<Optional< SparseSpatialMapController.SparseSpatialMapInfo >, Optional<string>> callback)
Create and upload map.