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 partially wrapped into Unity components: MegaTrackerFrameFilter . Members and instances of this type are not required to be used directly in most situations. Use this type by MegaTrackerFrameFilter.Tracker instead of creating new instances when a few unwrapped API is desired for use.
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 .
setInputFrameSourceType¶
- C#
public virtual void setInputFrameSourceType( InputFrameSourceType type)
Sets source type of input frames.
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.
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.
setLocalizationCallback¶
- C#
public virtual void setLocalizationCallback( CallbackScheduler callbackScheduler, Optional<Action< MegaTrackerLocalizationResponse >> callback)
Sets request delay. 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.