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.

public class SparseSpatialMapWorkerFrameFilter.SpatialMapServiceConfig

Service config for SparseSpatialMapManager .


MonoBehaviour Messages

protected virtual void Awake()

protected virtual void OnEnable()

protected virtual void OnDisable()

protected virtual 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 SparseSpatialMapWorkerFrameFilter.SpatialMapServiceConfig 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 Awake if available.

Use when building a map ( SparseSpatialMapWorkerFrameFilter.WorkingMode == SparseSpatialMapWorkerFrameFilter.Mode.Build ).

Localizer

C#

public SparseSpatialMap Localizer { get; }

EasyAR Sense API. Accessible after Awake if available.

Use when localizing a map ( SparseSpatialMapWorkerFrameFilter.WorkingMode == SparseSpatialMapWorkerFrameFilter.Mode.Localize ).

Manager

C#

public SparseSpatialMapManager Manager { get; }

EasyAR Sense API. Accessible after Awake 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.

EnablePoseStabilizer

C#

public bool EnablePoseStabilizer { get; set; }

Enable pose stabilizer.


Events

MapLoad

C#

public event Action< SparseSpatialMapController , SparseSpatialMapController.SparseSpatialMapInfo , 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 , SparseSpatialMapController.SparseSpatialMapInfo , 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.

MapHost

C#

public event Action< SparseSpatialMapController , SparseSpatialMapController.SparseSpatialMapInfo , bool, string> MapHost

Map create and upload finish event. The bool value indicates the create and upload success or not. The string value is the error message when fail.


Methods

LoadMap

C#

public void LoadMap( SparseSpatialMapController map)

Load map.

UnloadMap

C#

public void UnloadMap( SparseSpatialMapController map)

Unload map.

HostMap

C#

public void HostMap( SparseSpatialMapController map, string name, Optional< Image > preview)

Create and upload map.