MegaTrackerFrameFilter Class¶
Description¶
在场景中控制 MegaTracker 的 MonoBehaviour ,在Unity环境下提供功能扩展。
Properties¶
enabled¶
- C#
public bool enabled { get; set; }
ARSession 运行时开始/停止跟踪。在session启动后, MonoBehaviour .enabled为true时才会开始跟踪。
SimulatorLocation¶
- C#
public Optional<Scene.Location> SimulatorLocation { get; set; }
MegaTrackerFrameFilter.LocationInputMode == MegaLocationInputMode.Simulator 时使用的位置数据。
BlockHolder¶
- C#
public Scene.BlockHolder BlockHolder { get; }
持有Block的组件,在场景中持有并管理Block。
LandmarkFilter¶
- C#
public Optional< MegaLandmarkFilterWrapper > LandmarkFilter { get; }
MegaTrackerFrameFilter.ServiceType 为 MegaApiType.Landmark 时的Mega Landmark 过滤功能。开始时你需要手动调用 MegaLandmarkFilterWrapper.FilterBySpotId 。在Filter返回Found之前Tracker将不会开始跟踪。
ServiceType¶
- C#
public MegaApiType ServiceType { get; set; }
EasyAR Mega 服务类型。需要在Session启动前设置。
ServiceAccessSource¶
- C#
public MegaServiceAccessSourceType ServiceAccessSource { get; set; }
服务访问数据源类型。需要在Session启动前设置。
ServiceAccessData¶
- C#
public ExplicitAddressAccessData ServiceAccessData { get; set; }
服务访问数据。需要在Session启动前设置。使用 MegaServiceAccessSourceType.GlobalConfig 无需设置。
RequestTimeParameters¶
- C#
public MegaRequestTimeParameters RequestTimeParameters { get; set; }
请求时间参数。
ResultPoseType¶
- C#
public MegaResultPoseTypeParameters ResultPoseType { get; set; }
结果姿态类型参数。通常请勿修改,用于在特殊场景控制定位等,会影响跟踪效果。除非向EasyAR咨询并明确理解影响,否则不要使用。
通常请勿修改,用于在特殊场景控制定位等,会影响跟踪效果。除非向EasyAR咨询并明确理解影响,否则不要使用。
ProximityLocation¶
- C#
public Optional< ProximityLocationResult > ProximityLocation { set; }
邻近位置结果。
MinInputFrameLevel¶
- C#
public MegaInputFrameLevel MinInputFrameLevel { get; set; }
输入帧最小允许的 MegaInputFrameLevel 。如果frame source只能给出维度更低 CameraTransformType 的数据,Session会启动失败。需要在Session启动前设置。
LocationInputMode¶
- C#
public MegaLocationInputMode LocationInputMode { get; set; }
位置输入模式。需要在Session启动前设置。远程调试或电脑上运行必须设置成 MegaLocationInputMode.Simulator ,否则将无法使用。现场使用要设置成 MegaLocationInputMode.Onsite 以达到最佳效果。
Events¶
LocalizationRespond¶
- C#
public event Action< MegaLocalizationResponse > LocalizationRespond
服务定位返回事件。该事件通常用作debug,事件发生时场景中物体的位置和状态与事件中的数据无对应关系。
Methods¶
SwitchEndPoint¶
- C#
public void SwitchEndPoint( ExplicitAddressAccessData config, Scene.BlockRootController root)
切换远端端点。
ResetTracker¶
- C#
public void ResetTracker()
重置tracker。
UpdateToken¶
- C#
public void UpdateToken(string token)
更新API Token。