MegaLandmarkTracker Class

Description

提供VPS云定位功能。

MegaLandmarkTracker占用1个camera的buffer。

isAvailable

检查MegaLandmarkTracker是否可用。总是返回true。

C

bool easyar_MegaLandmarkTracker_isAvailable(void)

C++

static bool isAvailable()

Java

public static boolean isAvailable()

Kotlin

companion object fun isAvailable(): Boolean

Objective-C

+ (bool)isAvailable

Swift

public static func isAvailable() -> Bool

C#

public static bool isAvailable()

inputFrameSink

输入帧输入端口。MegaLandmarkTracker输入帧必须包含camera参数、时间戳信息和空间信息(cameraTransform和trackingStatus)。参考 InputFrameSink

C

void easyar_MegaLandmarkTracker_inputFrameSink(easyar_MegaLandmarkTracker * This, easyar_InputFrameSink * * Return)

C++

std::shared_ptr<InputFrameSink> inputFrameSink()

Java

public @Nonnull InputFrameSink inputFrameSink()

Kotlin

fun inputFrameSink(): InputFrameSink

Objective-C

- (easyar_InputFrameSink *)inputFrameSink

Swift

public func inputFrameSink() -> InputFrameSink

C#

public virtual InputFrameSink inputFrameSink()

accelerometerResultSink

加速度计结果输入端口。参考 AccelerometerResultSink

C

void easyar_MegaLandmarkTracker_accelerometerResultSink(easyar_MegaLandmarkTracker * This, easyar_AccelerometerResultSink * * Return)

C++

std::shared_ptr<AccelerometerResultSink> accelerometerResultSink()

Java

public @Nonnull AccelerometerResultSink accelerometerResultSink()

Kotlin

fun accelerometerResultSink(): AccelerometerResultSink

Objective-C

- (easyar_AccelerometerResultSink *)accelerometerResultSink

Swift

public func accelerometerResultSink() -> AccelerometerResultSink

C#

public virtual AccelerometerResultSink accelerometerResultSink()

locationResultSink

必选。位置结果输入端口。参考 LocationResultSink

C

void easyar_MegaLandmarkTracker_locationResultSink(easyar_MegaLandmarkTracker * This, easyar_LocationResultSink * * Return)

C++

std::shared_ptr<LocationResultSink> locationResultSink()

Java

public @Nonnull LocationResultSink locationResultSink()

Kotlin

fun locationResultSink(): LocationResultSink

Objective-C

- (easyar_LocationResultSink *)locationResultSink

Swift

public func locationResultSink() -> LocationResultSink

C#

public virtual LocationResultSink locationResultSink()

proximityLocationResultSink

必选。邻近位置结果输入端口。参考 ProximityLocationResultSink

C

void easyar_MegaLandmarkTracker_proximityLocationResultSink(easyar_MegaLandmarkTracker * This, easyar_ProximityLocationResultSink * * Return)

C++

std::shared_ptr<ProximityLocationResultSink> proximityLocationResultSink()

Java

public @Nonnull ProximityLocationResultSink proximityLocationResultSink()

Kotlin

fun proximityLocationResultSink(): ProximityLocationResultSink

Objective-C

- (easyar_ProximityLocationResultSink *)proximityLocationResultSink

Swift

public func proximityLocationResultSink() -> ProximityLocationResultSink

C#

public virtual ProximityLocationResultSink proximityLocationResultSink()

bufferRequirement

当前组件占用camera buffer的数量。

C

int easyar_MegaLandmarkTracker_bufferRequirement(easyar_MegaLandmarkTracker * This)

C++

int bufferRequirement()

Java

public int bufferRequirement()

Kotlin

fun bufferRequirement(): Int

Objective-C

- (int)bufferRequirement

Swift

public func bufferRequirement() -> Int32

C#

public virtual int bufferRequirement()

outputFrameSource

输出帧输出端口。参考 OutputFrameSource

C

void easyar_MegaLandmarkTracker_outputFrameSource(easyar_MegaLandmarkTracker * This, easyar_OutputFrameSource * * Return)

C++

std::shared_ptr<OutputFrameSource> outputFrameSource()

Java

public @Nonnull OutputFrameSource outputFrameSource()

Kotlin

fun outputFrameSource(): OutputFrameSource

Objective-C

- (easyar_OutputFrameSource *)outputFrameSource

Swift

public func outputFrameSource() -> OutputFrameSource

C#

public virtual OutputFrameSource outputFrameSource()

create

创建。

C

void easyar_MegaLandmarkTracker_create(easyar_String * server, easyar_String * apiKey, easyar_String * apiSecret, easyar_String * appId, easyar_MegaLandmarkTracker * * Return)

C++

static std::shared_ptr<MegaLandmarkTracker> create(std::string server, std::string apiKey, std::string apiSecret, std::string appId)

Java

public static @Nonnull MegaLandmarkTracker create(java.lang.@Nonnull String server, java.lang.@Nonnull String apiKey, java.lang.@Nonnull String apiSecret, java.lang.@Nonnull String appId)

Kotlin

companion object fun create(server: String, apiKey: String, apiSecret: String, appId: String): MegaLandmarkTracker

Objective-C

+ (easyar_MegaLandmarkTracker *)create:(NSString *)server apiKey:(NSString *)apiKey apiSecret:(NSString *)apiSecret appId:(NSString *)appId

Swift

public static func create(_ server: String, _ apiKey: String, _ apiSecret: String, _ appId: String) -> MegaLandmarkTracker

C#

public static MegaLandmarkTracker create(string server, string apiKey, string apiSecret, string appId)

setRequestTimeParameters

设置请求时间参数。timeoutMilliseconds为连接超时时间。requestIntervalMilliseconds为期望的请求间隔时间,默认为1000,最小为300,值越大整体误差越大。

C

void easyar_MegaLandmarkTracker_setRequestTimeParameters(easyar_MegaLandmarkTracker * This, easyar_OptionalOfInt timeoutMilliseconds, int requestIntervalMilliseconds)

C++

void setRequestTimeParameters(std::optional<int> timeoutMilliseconds, int requestIntervalMilliseconds)

Java

public void setRequestTimeParameters(java.lang.@Nullable Integer timeoutMilliseconds, int requestIntervalMilliseconds)

Kotlin

fun setRequestTimeParameters(timeoutMilliseconds: Int?, requestIntervalMilliseconds: Int): Unit

Objective-C

- (void)setRequestTimeParameters:(NSNumber *)timeoutMilliseconds requestIntervalMilliseconds:(int)requestIntervalMilliseconds

Swift

public func setRequestTimeParameters(_ timeoutMilliseconds: Int32?, _ requestIntervalMilliseconds: Int32) -> Void

C#

public virtual void setRequestTimeParameters(Optional<int> timeoutMilliseconds, int requestIntervalMilliseconds)

setResultPoseType

设置结果姿态类型。默认enableLocalization和enableStabilization均为true。

C

void easyar_MegaLandmarkTracker_setResultPoseType(easyar_MegaLandmarkTracker * This, bool enableLocalization, bool enableStabilization)

C++

void setResultPoseType(bool enableLocalization, bool enableStabilization)

Java

public void setResultPoseType(boolean enableLocalization, boolean enableStabilization)

Kotlin

fun setResultPoseType(enableLocalization: Boolean, enableStabilization: Boolean): Unit

Objective-C

- (void)setResultPoseType:(bool)enableLocalization enableStabilization:(bool)enableStabilization

Swift

public func setResultPoseType(_ enableLocalization: Bool, _ enableStabilization: Bool) -> Void

C#

public virtual void setResultPoseType(bool enableLocalization, bool enableStabilization)

setResultAsyncMode

设置结果异步模式。如果结果通过outputFrameSource输出,则应设置位true,如果结果通过getSyncResult获取,则应设置为false。默认enableAsync为true。同步模式仅使用XR License时可生效。

C

bool easyar_MegaLandmarkTracker_setResultAsyncMode(easyar_MegaLandmarkTracker * This, bool enableAsync)

C++

bool setResultAsyncMode(bool enableAsync)

Java

public boolean setResultAsyncMode(boolean enableAsync)

Kotlin

fun setResultAsyncMode(enableAsync: Boolean): Boolean

Objective-C

- (bool)setResultAsyncMode:(bool)enableAsync

Swift

public func setResultAsyncMode(_ enableAsync: Bool) -> Bool

C#

public virtual bool setResultAsyncMode(bool enableAsync)

setRequestMessage

C

void easyar_MegaLandmarkTracker_setRequestMessage(easyar_MegaLandmarkTracker * This, easyar_String * message)

C++

void setRequestMessage(std::string message)

Java

public void setRequestMessage(java.lang.@Nonnull String message)

Kotlin

fun setRequestMessage(message: String): Unit

Objective-C

- (void)setRequestMessage:(NSString *)message

Swift

public func setRequestMessage(_ message: String) -> Void

C#

public virtual void setRequestMessage(string message)

setFilteringCallback

设置位置筛选回调。每次位置筛选时,会触发此回调。

C

void easyar_MegaLandmarkTracker_setFilteringCallback(easyar_MegaLandmarkTracker * This, easyar_CallbackScheduler * callbackScheduler, easyar_OptionalOfFunctorOfVoidFromMegaLandmarkTrackerFilteringResponse callback)

C++

void setFilteringCallback(std::shared_ptr<CallbackScheduler> callbackScheduler, std::optional<std::function<void(std::shared_ptr<MegaLandmarkTrackerFilteringResponse>)>> callback)

Java

public void setFilteringCallback(@Nonnull CallbackScheduler callbackScheduler, @Nullable FunctorOfVoidFromMegaLandmarkTrackerFilteringResponse callback)

Kotlin

fun setFilteringCallback(callbackScheduler: CallbackScheduler, callback: FunctorOfVoidFromMegaLandmarkTrackerFilteringResponse?): Unit

Objective-C

- (void)setFilteringCallback:(easyar_CallbackScheduler *)callbackScheduler callback:(void (^)(easyar_MegaLandmarkTrackerFilteringResponse * response))callback

Swift

public func setFilteringCallback(_ callbackScheduler: CallbackScheduler, _ callback: ((MegaLandmarkTrackerFilteringResponse) -> Void)?) -> Void

C#

public virtual void setFilteringCallback(CallbackScheduler callbackScheduler, Optional<Action<MegaLandmarkTrackerFilteringResponse>> callback)

setLocalizationCallback

设置定位回调。每次定位时,会触发此回调。

C

void easyar_MegaLandmarkTracker_setLocalizationCallback(easyar_MegaLandmarkTracker * This, easyar_CallbackScheduler * callbackScheduler, easyar_OptionalOfFunctorOfVoidFromMegaLandmarkTrackerLocalizationResponse callback)

C++

void setLocalizationCallback(std::shared_ptr<CallbackScheduler> callbackScheduler, std::optional<std::function<void(std::shared_ptr<MegaLandmarkTrackerLocalizationResponse>)>> callback)

Java

public void setLocalizationCallback(@Nonnull CallbackScheduler callbackScheduler, @Nullable FunctorOfVoidFromMegaLandmarkTrackerLocalizationResponse callback)

Kotlin

fun setLocalizationCallback(callbackScheduler: CallbackScheduler, callback: FunctorOfVoidFromMegaLandmarkTrackerLocalizationResponse?): Unit

Objective-C

- (void)setLocalizationCallback:(easyar_CallbackScheduler *)callbackScheduler callback:(void (^)(easyar_MegaLandmarkTrackerLocalizationResponse * response))callback

Swift

public func setLocalizationCallback(_ callbackScheduler: CallbackScheduler, _ callback: ((MegaLandmarkTrackerLocalizationResponse) -> Void)?) -> Void

C#

public virtual void setLocalizationCallback(CallbackScheduler callbackScheduler, Optional<Action<MegaLandmarkTrackerLocalizationResponse>> callback)

start

开始MegaLandmarkTracker。

C

bool easyar_MegaLandmarkTracker_start(easyar_MegaLandmarkTracker * This)

C++

bool start()

Java

public boolean start()

Kotlin

fun start(): Boolean

Objective-C

- (bool)start

Swift

public func start() -> Bool

C#

public virtual bool start()

stop

停止MegaLandmarkTracker。调用start重新运行。

C

void easyar_MegaLandmarkTracker_stop(easyar_MegaLandmarkTracker * This)

C++

void stop()

Java

public void stop()

Kotlin

fun stop(): Unit

Objective-C

- (void)stop

Swift

public func stop() -> Void

C#

public virtual void stop()

reset

重置MegaLandmarkTracker,清除所有状态。

C

void easyar_MegaLandmarkTracker_reset(easyar_MegaLandmarkTracker * This)

C++

void reset()

Java

public void reset()

Kotlin

fun reset(): Unit

Objective-C

- (void)reset

Swift

public func reset() -> Void

C#

public virtual void reset()

close

关闭MegaLandmarkTracker。close之后不应继续使用。

C

void easyar_MegaLandmarkTracker_close(easyar_MegaLandmarkTracker * This)

C++

void close()

Java

public void close()

Kotlin

fun close(): Unit

Objective-C

- (void)close

Swift

public func close() -> Void

C#

public virtual void close()

getSyncResult

获得同步输出结果。如果MegaLandmarkTracker已暂停,或者未通过setResultAsyncMode将结果异步模式设为false,则返回值为空。

C

void easyar_MegaLandmarkTracker_getSyncResult(easyar_MegaLandmarkTracker * This, double timestamp, easyar_Matrix44F cameraTransform, easyar_MotionTrackingStatus trackingStatus, easyar_OptionalOfMegaLandmarkTrackerResult * Return)

C++

std::optional<std::shared_ptr<MegaLandmarkTrackerResult>> getSyncResult(double timestamp, Matrix44F cameraTransform, MotionTrackingStatus trackingStatus)

Java

public @Nullable MegaLandmarkTrackerResult getSyncResult(double timestamp, @Nonnull Matrix44F cameraTransform, int trackingStatus)

Kotlin

fun getSyncResult(timestamp: Double, cameraTransform: Matrix44F, trackingStatus: Int): MegaLandmarkTrackerResult?

Objective-C

- (easyar_MegaLandmarkTrackerResult *)getSyncResult:(double)timestamp cameraTransform:(easyar_Matrix44F *)cameraTransform trackingStatus:(easyar_MotionTrackingStatus)trackingStatus

Swift

public func getSyncResult(_ timestamp: Double, _ cameraTransform: Matrix44F, _ trackingStatus: MotionTrackingStatus) -> MegaLandmarkTrackerResult?

C#

public virtual Optional<MegaLandmarkTrackerResult> getSyncResult(double timestamp, Matrix44F cameraTransform, MotionTrackingStatus trackingStatus)