MegaTracker Class¶
This type is an EasyAR Sense API in C#: MegaTracker . Some descriptions may not apply to Unity environment on this page.
This type is fully wrapped into Unity components: MegaBlockTrackerFrameFilter . There is no need to use this type directly.
Description¶
Provides cloud based localization.
MegaTracker 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 MegaTracker 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()
Optional. Input port for location result. See also LocationResultSink .
proximityLocationResultSink¶
- C#
public virtual ProximityLocationResultSink proximityLocationResultSink()
Optional. 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 MegaTracker create(string server, string apiKey, string apiSecret, string appId)
Creates an instance.
switchEndPoint¶
- C#
public virtual void switchEndPoint(string server, string apiKey, string apiSecret, string appId)
Switches remote end point.
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.
setLocalizationCallback¶
- C#
public virtual void setLocalizationCallback( CallbackScheduler callbackScheduler, Optional<Action< MegaTrackerLocalizationResponse >> callback)
Sets localization callback. On every localization, the callback will be triggered.
start¶
- C#
public virtual bool start()
Start MegaTracker.
stop¶
- C#
public virtual void stop()
Stop MegaTracker. Call start() to resume running.
reset¶
- C#
public virtual void reset()
Reset MegaTracker and clear all internal states.
close¶
- C#
public virtual void close()
Close MegaTracker. MegaTracker can no longer be used.
getSyncResult¶
- C#
public virtual Optional< MegaTrackerResult > getSyncResult(double timestamp, Matrix44F cameraTransform, MotionTrackingStatus trackingStatus)
Get synchronized result. If MegaTracker is paused, or the result async mode is not set to false through setResultAsyncMode, the return value is empty.