Table Of Contents

Previous topic

2.0

Next topic

ARSceneTracker Class

ARScene Class

Inherits: Target

Description

EasyAR implements SLAM on Android and iOS devices with special optimizations, it is not recommended to run SLAM on Windows or Mac. The algorithm effects will be totally different. SLAM for Windows and Mac is only for development purpose, to ease content creation.

ARScene represents SLAM targets that can be tracked by ARSceneTracker.

ARScene do not need to be setup from json, Frame returned from FrameStreamer.peek will include target of ARScene type automatically when using ARSceneTracker.

Constructor

C: void easyar_ARScene__ctor(easyar_ARScene** Return)
C++11: ARScene()
Traditional C++: ARScene()
Java: public ARScene()
Objective-C: + (easyar_ARScene *) create
Swift (since EasyAR SDK 2.1.0): public convenience init()

runtimeID

Returns the target id. A target id is a int number generated at runtime, it is valid (non-zero) only after a successful setup. This id is non-zero and increasing globally.

C: int easyar_ARScene_runtimeID(const easyar_ARScene* This)
C++11: int runtimeID()
Traditional C++: int runtimeID()
Java: public native int runtimeID()
Objective-C: - (int)runtimeID
Swift (since EasyAR SDK 2.1.0): public override func runtimeID() -> Int32

uid

Returns the target uid. A target uid is useful in cloud based algorithms. If no cloud is used, you can set this uid in the json config as an alternative method to distinguish from targets.

C: void easyar_ARScene_uid(const easyar_ARScene* This, easyar_String** Return)
C++11: std::string uid()
Traditional C++: void uid(String** Return)
Java: public native java.lang.String uid()
Objective-C: - (NSString *)uid
Swift (since EasyAR SDK 2.1.0): public override func uid() -> String

name

Returns the target name. Name is used to distinguish targets in a json file. see setup for more details.

C: void easyar_ARScene_name(const easyar_ARScene* This, easyar_String** Return)
C++11: std::string name()
Traditional C++: void name(String** Return)
Java: public native java.lang.String name()
Objective-C: - (NSString *)name
Swift (since EasyAR SDK 2.1.0): public override func name() -> String

meta

Returns the meta data set by setMetaData. Or, in a cloud returned target, returns the meta data set in the cloud server.

C: void easyar_ARScene_meta(const easyar_ARScene* This, easyar_String** Return)
C++11: std::string meta()
Traditional C++: void meta(String** Return)
Java: public native java.lang.String meta()
Objective-C: - (NSString *)meta
Swift (since EasyAR SDK 2.1.0): public override func meta() -> String

setMeta

Set meta data. It will erase previously set data or data from cloud.

C: void easyar_ARScene_setMeta(easyar_ARScene* This, easyar_String* data)
C++11: void setMeta(std::string data)
Traditional C++: void setMeta(String* data)
Java: public native void setMeta(java.lang.String data)
Objective-C: - (void)setMeta:(NSString *)data
Swift (since EasyAR SDK 2.1.0): public override func setMeta(_ data: String) -> Void