TargetInstance Class

Description

TargetInstance是被tracker跟踪到的target。

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

Constructor

C: void easyar_TargetInstance__ctor(easyar_TargetInstance * * Return)
C++11: TargetInstance()
Traditional C++: TargetInstance()
Java: public TargetInstance()
Objective-C: + (easyar_TargetInstance *) create
Swift (since EasyAR SDK 2.1.0): public convenience init()

status

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

C: easyar_TargetStatus easyar_TargetInstance_status(const easyar_TargetInstance * This)
C++11: TargetStatus status()
Traditional C++: TargetStatus status()
Java: public native /* TargetStatus */ int status()
Objective-C: - (easyar_TargetStatus)status
Swift (since EasyAR SDK 2.1.0): public func status() -> TargetStatus

target

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

C: void easyar_TargetInstance_target(const easyar_TargetInstance * This, easyar_Target * * Return)
C++11: std::shared_ptr<Target> target()
Traditional C++: void target(Target * * Return)
Java: public native Target target()
Objective-C: - (easyar_Target *)target
Swift (since EasyAR SDK 2.1.0): public func target() -> Target?

pose

返回当前被跟踪的target的姿态。

C: easyar_Matrix34F easyar_TargetInstance_pose(const easyar_TargetInstance * This)
C++11: Matrix34F pose()
Traditional C++: Matrix34F pose()
Java: public native Matrix34F pose()
Objective-C: - (easyar_Matrix34F *)pose
Swift (since EasyAR SDK 2.1.0): public func pose() -> Matrix34F

poseGL

返回使用OpenGL坐标系和矩阵格式的当前被跟踪的target的姿态。

C: easyar_Matrix44F easyar_TargetInstance_poseGL(const easyar_TargetInstance * This)
C++11: Matrix44F poseGL()
Traditional C++: Matrix44F poseGL()
Java: public native Matrix44F poseGL()
Objective-C: - (easyar_Matrix44F *)poseGL
Swift (since EasyAR SDK 2.1.0): public func poseGL() -> Matrix44F