Target Class

Description

Target is the base class for all targets that can be tracked by ImageTracker or other algorithms inside EasyAR.

runtimeID

Returns the target id. A target id is a integer number generated at runtime. This id is non-zero and increasing globally.

C

int easyar_Target_runtimeID(const easyar_Target * This)

C++

int runtimeID()

Java

public int runtimeID()

Kotlin

fun runtimeID(): Int

Objective-C

- (int)runtimeID

Swift

public func runtimeID() -> Int32

C#

public virtual int runtimeID()

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 a alternative method to distinguish from targets.

C

void easyar_Target_uid(const easyar_Target * This, easyar_String * * Return)

C++

std::string uid()

Java

public java.lang.@Nonnull String uid()

Kotlin

fun uid(): String

Objective-C

- (NSString *)uid

Swift

public func uid() -> String

C#

public virtual string uid()

name

Returns the target name. Name is used to distinguish targets in a json file.

C

void easyar_Target_name(const easyar_Target * This, easyar_String * * Return)

C++

std::string name()

Java

public java.lang.@Nonnull String name()

Kotlin

fun name(): String

Objective-C

- (NSString *)name

Swift

public func name() -> String

C#

public virtual string name()

setName

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

C

void easyar_Target_setName(easyar_Target * This, easyar_String * name)

C++

void setName(std::string name)

Java

public void setName(java.lang.@Nonnull String name)

Kotlin

fun setName(name: String): Unit

Objective-C

- (void)setName:(NSString *)name

Swift

public func setName(_ name: String) -> Void

C#

public virtual void setName(string name)

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_Target_meta(const easyar_Target * This, easyar_String * * Return)

C++

std::string meta()

Java

public java.lang.@Nonnull String meta()

Kotlin

fun meta(): String

Objective-C

- (NSString *)meta

Swift

public func meta() -> String

C#

public virtual string meta()

setMeta

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

C

void easyar_Target_setMeta(easyar_Target * This, easyar_String * data)

C++

void setMeta(std::string data)

Java

public void setMeta(java.lang.@Nonnull String data)

Kotlin

fun setMeta(data: String): Unit

Objective-C

- (void)setMeta:(NSString *)data

Swift

public func setMeta(_ data: String) -> Void

C#

public virtual void setMeta(string data)