Table of Contents

Class MegaTrackerFrameFilter

命名空間
easyar
組件
EasyAR.Sense.dll

在場景中控制easyar.MegaTrackerMonoBehaviour,在Unity環境下提供功能擴展。

[RequireComponent(typeof(BlockHolder))]
public class MegaTrackerFrameFilter : FrameFilter
繼承
MegaTrackerFrameFilter

屬性

BlockHolder

持有Block的組件,在場景中持有並管理Block。

public BlockHolder BlockHolder { get; }

CameraPositionOverride

相機位置相對於地圖block的覆蓋值。設置之後,MegaTracker會輸出覆蓋值,而不使用輸入幀數據中的對應座標。可用於在已知地圖資訊且感測器有限的情況下提高輸出位姿的精確度。

public (Optional<float> x, Optional<float> y, Optional<float> z) CameraPositionOverride { get; set; }

EnableLocalization

是否啟用定位。不啟用定位時,伺服器返回的定位結果不會輸出。預設為true。

會影響跟踪效果。除非向EasyAR諮詢並明確理解影響,否則不要使用。

public bool EnableLocalization { get; set; }

EnableStatelessLocalization

是否啟用無狀態定位。啟用無狀態定位時,定位時不會使用上一次定位結果。預設為false。

會影響跟踪效果。除非向EasyAR諮詢並明確理解影響,否則不要使用。

public bool EnableStatelessLocalization { get; set; }

LandmarkFilter

ServiceTypeLandmark時的Mega Landmark 過濾功能。開始時你需要手動調用FilterBySpotId(string, Action<MegaLandmarkFilterResponse>)。在Filter返回Found之前Tracker將不會開始跟踪。

public Optional<MegaLandmarkFilterWrapper> LandmarkFilter { get; }

LocationInputMode

位置輸入模式。需要在Session啟動前設置。遠端調試或電腦上運行必須設置成Simulator,否則將無法使用。現場使用要設置成Onsite以達到最佳效果。

public MegaLocationInputMode LocationInputMode { get; set; }

MinInputFrameLevel

輸入幀最小允許的MegaInputFrameLevel。如果frame source只能給出維度更低CameraTransformType的數據,Session會啟動失敗。需要在Session啟動前設置。

public MegaInputFrameLevel MinInputFrameLevel { get; set; }

ProximityLocation

鄰近位置結果。

public Optional<ProximityLocationResult> ProximityLocation { set; }

RequestMessage

public string RequestMessage { get; set; }

RequestTimeParameters

請求時間參數。

public MegaRequestTimeParameters RequestTimeParameters { get; set; }

ServiceAccessData

服務訪問數據。需要在Session啟動前設置。使用GlobalConfig無需設置。

public ExplicitAddressAccessData ServiceAccessData { get; set; }

ServiceAccessSource

服務訪問數據源類型。需要在Session啟動前設置。

public MegaServiceAccessSourceType ServiceAccessSource { get; set; }

ServiceType

EasyAR Mega 服務類型。需要在Session啟動前設置。

public MegaApiType ServiceType { get; set; }

SimulatorLocation

LocationInputMode == Simulator時使用的位置數據。

public Optional<Location> SimulatorLocation { get; set; }

方法

ResetTracker()

重置tracker。

public void ResetTracker()

SwitchEndPoint(ExplicitAddressAccessData, BlockRootController)

切換遠端端點。

public void SwitchEndPoint(ExplicitAddressAccessData config, BlockRootController root)

參數

config
root

UpdateToken(string)

更新API Token。

public void UpdateToken(string token)

參數

token

事件

LocalizationRespond

服務定位返回事件。該事件通常用作debug,事件發生時場景中物體的位置和狀態與事件中的數據無對應關係。

public event Action<MegaLocalizationResponse> LocalizationRespond