TargetInstance Class

Description

TargetInstance是被tracker跟踪到的target。

TargetInstance包括被跟踪上的原始 Target 以及这个 Target 当前的状态和姿态。

Constructor

C

void easyar_TargetInstance__ctor(easyar_TargetInstance * * Return)

C++17

TargetInstance()

C++03(Deprecated)

TargetInstance()

Java

public TargetInstance()

Kotlin

constructor()

Objective-C

+ (easyar_TargetInstance *) create

Swift

public convenience init()

C#

public TargetInstance()

status

返回当前被跟踪target的状态。通常你可以status是否等于 TargetStatus.Tracked 来判断当前target的状态。

C

easyar_TargetStatus easyar_TargetInstance_status(const easyar_TargetInstance * This)

C++17

TargetStatus status()

C++03(Deprecated)

TargetStatus status()

Java

public int status()

Kotlin

fun status(): Int

Objective-C

- (easyar_TargetStatus)status

Swift

public func status() -> TargetStatus

C#

public virtual TargetStatus status()

target

获取原始target。如果曾经被加载到tracker中,会返回与load进 tracker 相同的 Target

C

void easyar_TargetInstance_target(const easyar_TargetInstance * This, easyar_OptionalOfTarget * Return)

C++17

std::optional<std::shared_ptr<Target>> target()

C++03(Deprecated)

void target(Target * * Return)

Java

public @Nullable Target target()

Kotlin

fun target(): Target?

Objective-C

- (easyar_Target *)target

Swift

public func target() -> Target?

C#

public virtual Optional<Target> target()

pose

返回当前被跟踪的target相对于Camera的位姿。其中camera坐标系与target坐标系均为右手坐标系。Camera坐标系的原点为相机光心,x轴正方向为右,y轴正方向为上,z轴正方向为光线进入相机的方向。(其中的右和上,在移动设备上指设备自然方向的右和上。)数据的排列方式为row-major,与OpenGL的column-major相反。

C

easyar_Matrix44F easyar_TargetInstance_pose(const easyar_TargetInstance * This)

C++17

Matrix44F pose()

C++03(Deprecated)

Matrix44F pose()

Java

public @Nonnull Matrix44F pose()

Kotlin

fun pose(): Matrix44F

Objective-C

- (easyar_Matrix44F *)pose

Swift

public func pose() -> Matrix44F

C#

public virtual Matrix44F pose()