CloudLocalizer Class

Description

CloudLocalizer实现了云定位功能。

isAvailable

返回true。

C

bool easyar_CloudLocalizer_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()

create

创建并连接服务器。

C

void easyar_CloudLocalizer_create(easyar_String * server, easyar_String * apiKey, easyar_String * apiSecret, easyar_String * appId, easyar_CloudLocalizer * * Return)

C++

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

Java

public static @Nonnull CloudLocalizer 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): CloudLocalizer

Objective-C

+ (easyar_CloudLocalizer *)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) -> CloudLocalizer

C#

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

resolve

请求定位。

输入 InputFrame 进行云定位。 InputFrame 必须包含图像以及相机参数。

message为json格式字串。

acceleration是可选项,用于传入设备加速度计的读数。

location是可选项,用于传入设备位置读数。

C

void easyar_CloudLocalizer_resolve(easyar_CloudLocalizer * This, easyar_InputFrame * inputFrame, easyar_String * message, easyar_DeviceAuxiliaryInfo * deviceAuxInfo, easyar_OptionalOfInt timeoutMilliseconds, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromCloudLocalizerResult callback)

C++

void resolve(std::shared_ptr<InputFrame> inputFrame, std::string message, std::shared_ptr<DeviceAuxiliaryInfo> deviceAuxInfo, std::optional<int> timeoutMilliseconds, std::shared_ptr<CallbackScheduler> callbackScheduler, std::function<void(std::shared_ptr<CloudLocalizerResult>)> callback)

Java

public void resolve(@Nonnull InputFrame inputFrame, java.lang.@Nonnull String message, @Nonnull DeviceAuxiliaryInfo deviceAuxInfo, java.lang.@Nullable Integer timeoutMilliseconds, @Nonnull CallbackScheduler callbackScheduler, @Nonnull FunctorOfVoidFromCloudLocalizerResult callback)

Kotlin

fun resolve(inputFrame: InputFrame, message: String, deviceAuxInfo: DeviceAuxiliaryInfo, timeoutMilliseconds: Int?, callbackScheduler: CallbackScheduler, callback: FunctorOfVoidFromCloudLocalizerResult): Unit

Objective-C

- (void)resolve:(easyar_InputFrame *)inputFrame message:(NSString *)message deviceAuxInfo:(easyar_DeviceAuxiliaryInfo *)deviceAuxInfo timeoutMilliseconds:(NSNumber *)timeoutMilliseconds callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler callback:(void (^)(easyar_CloudLocalizerResult * result))callback

Swift

public func resolve(_ inputFrame: InputFrame, _ message: String, _ deviceAuxInfo: DeviceAuxiliaryInfo, _ timeoutMilliseconds: Int32?, _ callbackScheduler: CallbackScheduler, _ callback: @escaping (CloudLocalizerResult) -> Void) -> Void

C#

public virtual void resolve(InputFrame inputFrame, string message, DeviceAuxiliaryInfo deviceAuxInfo, Optional<int> timeoutMilliseconds, CallbackScheduler callbackScheduler, Action<CloudLocalizerResult> callback)

close

停止定位并关闭连接。close之后不应继续使用。

C

void easyar_CloudLocalizer_close(easyar_CloudLocalizer * 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()