CloudLocalizer Class

Description

CloudLocalizer implements cloud based localization.

isAvailable

Returns 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

Creates an instance and connects to the server.

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

Send localization request.

Send InputFrame to resolve a cloud localization. InputFrame should have at least image data and camera parameters.

message input is a json string.

acceleration is optional which is the readings from device accelerometer.

location is optional which is the readings from device location manager.

C

void easyar_CloudLocalizer_resolve(easyar_CloudLocalizer * This, easyar_InputFrame * inputFrame, easyar_String * message, easyar_OptionalOfVec3F acceleration, easyar_OptionalOfVec3D location, easyar_OptionalOfInt timeoutMilliseconds, easyar_CallbackScheduler * callbackScheduler, easyar_FunctorOfVoidFromCloudLocalizeResult callback)

C++

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

Java

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

Kotlin

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

Objective-C

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

Swift

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

C#

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

close

Stops the localization and closes connection. The component shall not be used after calling 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()