CloudLocalizer Class

Description

CloudLocalizer实现了云定位功能。

isAvailable

返回true。

C

bool easyar_CloudLocalizer_isAvailable(void)

C++17

static bool isAvailable()

C++03(Deprecated)

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++17

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

C++03(Deprecated)

static void create(String * server, String * apiKey, String * apiSecret, String * appId, CloudLocalizer * * Return)

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_OptionalOfVec3F acceleration, easyar_OptionalOfVec3D location, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromCloudLocalizeResult callback)

C++17

void resolve(std::shared_ptr<InputFrame> inputFrame, std::string message, std::optional<Vec3F> acceleration, std::optional<Vec3D> location, std::shared_ptr<CallbackScheduler> callbackScheduler, std::function<void(std::shared_ptr<CloudLocalizeResult>)> callback)

C++03(Deprecated)

void resolve(InputFrame * inputFrame, String * message, OptionalOfVec3F acceleration, OptionalOfVec3D location, CallbackScheduler * callbackScheduler, FunctorOfVoidFromCloudLocalizeResult callback)

Java

public void resolve(@Nonnull InputFrame inputFrame, java.lang.@Nonnull String message, @Nullable Vec3F acceleration, @Nullable Vec3D location, @Nonnull CallbackScheduler callbackScheduler, @Nonnull FunctorOfVoidFromCloudLocalizeResult callback)

Kotlin

fun resolve(inputFrame: InputFrame, message: String, acceleration: Vec3F?, location: Vec3D?, callbackScheduler: CallbackScheduler, callback: FunctorOfVoidFromCloudLocalizeResult): Unit

Objective-C

- (void)resolve:(easyar_InputFrame *)inputFrame message:(NSString *)message acceleration:(easyar_Vec3F *)acceleration location:(easyar_Vec3D *)location callbackScheduler:(easyar_CallbackScheduler *)callbackScheduler callback:(void (^)(easyar_CloudLocalizeResult * result))callback

Swift

public func resolve(_ inputFrame: InputFrame, _ message: String, _ acceleration: Vec3F?, _ location: Vec3D?, _ callbackScheduler: CallbackScheduler, _ callback: @escaping (CloudLocalizeResult) -> Void) -> Void

C#

public virtual void resolve(InputFrame inputFrame, string message, Optional<Vec3F> acceleration, Optional<Vec3D> location, CallbackScheduler callbackScheduler, Action<CloudLocalizeResult> callback)

close

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

C

void easyar_CloudLocalizer_close(easyar_CloudLocalizer * This)

C++17

void close()

C++03(Deprecated)

void close()

Java

public void close()

Kotlin

fun close(): Unit

Objective-C

- (void)close

Swift

public func close() -> Void

C#

public virtual void close()