MegaLandmarkTracker Class¶
This type is an EasyAR Sense API in C#: MegaLandmarkTracker . Some descriptions may not apply to Unity environment on this page.
This type is fully wrapped into Unity components: MegaLandmarkTrackerFrameFilter . There is no need to use this type directly.
Description¶
Provides cloud based visual positioning localization.
MegaLandmarkTracker occupies 1 buffers of camera.
Methods¶
isAvailable¶
- C#
public static bool isAvailable()
Check whether SparseSpatialMap is is available, always return true.
inputFrameSink¶
- C#
public virtual InputFrameSink inputFrameSink()
Input port for input frame. For MegaLandmarkTracker to work, the inputFrame must include camera parameters, timestamp and spatial information. See also InputFrameSink .
accelerometerResultSink¶
- C#
public virtual AccelerometerResultSink accelerometerResultSink()
Input port for accelerometer result. See also AccelerometerResultSink .
locationResultSink¶
- C#
public virtual LocationResultSink locationResultSink()
Required. Input port for location result. See also LocationResultSink .
proximityLocationResultSink¶
- C#
public virtual ProximityLocationResultSink proximityLocationResultSink()
Required. Input port for proximity location result. See also ProximityLocationResultSink .
bufferRequirement¶
- C#
public virtual int bufferRequirement()
Camera buffers occupied in this component.
outputFrameSource¶
- C#
public virtual OutputFrameSource outputFrameSource()
Output port for output frame. See also OutputFrameSource .
create¶
- C#
public static MegaLandmarkTracker create(string server, string apiKey, string apiSecret, string appId)
Creates an instance.
setRequestTimeParameters¶
- C#
public virtual void setRequestTimeParameters(Optional<int> timeoutMilliseconds, int requestIntervalMilliseconds)
Sets request time parameters. timeoutMilliseconds is connection timeout. requestIntervalMilliseconds is the expected request interval, and the default value is 1000 and the minimum value is 300, with a longer value results a larger overall error.
setResultPoseType¶
- C#
public virtual void setResultPoseType(bool enableLocalization, bool enableStabilization)
Sets type of result pose. enableLocalization and enableStabilization default to true.
setResultAsyncMode¶
- C#
public virtual bool setResultAsyncMode(bool enableAsync)
Sets result async mode. Set true If results are to be outputted via outputFrameSource, false if results are to be fetched via getSyncResult. enableAsync defaults to true. Sync mode is only available with a XR license.
setFilteringCallback¶
- C#
public virtual void setFilteringCallback( CallbackScheduler callbackScheduler, Optional<Action< MegaLandmarkTrackerFilteringResponse >> callback)
Sets location filtering callback. On every location filtering, the callback will be triggered.
setLocalizationCallback¶
- C#
public virtual void setLocalizationCallback( CallbackScheduler callbackScheduler, Optional<Action< MegaLandmarkTrackerLocalizationResponse >> callback)
Sets localization callback. On every localization, the callback will be triggered.
start¶
- C#
public virtual bool start()
Start MegaLandmarkTracker.
stop¶
- C#
public virtual void stop()
Stop MegaLandmarkTracker. Call start() to resume running.
reset¶
- C#
public virtual void reset()
Reset MegaLandmarkTracker and clear all internal states.
close¶
- C#
public virtual void close()
Close MegaLandmarkTracker. MegaLandmarkTracker can no longer be used.
getSyncResult¶
- C#
public virtual Optional< MegaLandmarkTrackerResult > getSyncResult( MotionInputData motionInputData)
Get synchronized result. If MegaLandmarkTracker is paused, or the result async mode is not set to false through setResultAsyncMode, the return value is empty.