Wikitude Unity Plugin
Public Member Functions | Properties | List of all members
Wikitude.ImageTarget Class Reference

An image target contains information about a tracked target. More...

Inheritance diagram for Wikitude.ImageTarget:
Wikitude.RecognizedTarget

Public Member Functions

float ComputeDistanceToImageTarget (ImageTarget otherTarget)
 The physical distance between this target and another image target. This computation only returns reliable values if the .wtc file or the cloud archive included physical image target heights. More...
 
float ComputeCameraDistanceToTarget ()
 The physical distance from the camera to the image target in millimeters. This computation only returns reliable values if the .wtc file or the cloud archive included physical image target heights. More...
 

Properties

new string Name [get]
 The name of the associated target image in the .wtc file. More...
 
new long ID [get]
 The unique ID of the target. When tracking multiple targets with the same name, this can be used to distinguish between them. More...
 
Vector2 Scale [get]
 Normalized scale of the tracked target. Specifies the relation between the x and y scales. One of them is 1.0f, while the other is between 0.0f and 1.0f. Can be used to programmatically scale augmentations to fit targets. More...
 

Additional Inherited Members

- Public Attributes inherited from Wikitude.RecognizedTarget
GameObject Drawable
 A drawable is created when a tracker starts tracking and it should be used to place augmentations. A drawable is destroyed after a tracker loses the target. When a single target is tracked, the trackable is not moved. In case of multiple targets, one of the drawables is fixed, and the others are placed relative to it. More...
 

Detailed Description

An image target contains information about a tracked target.

Member Function Documentation

float Wikitude.ImageTarget.ComputeCameraDistanceToTarget ( )
inline

The physical distance from the camera to the image target in millimeters. This computation only returns reliable values if the .wtc file or the cloud archive included physical image target heights.

Returns
The physical distance in millimiters between the camera adn the image target.
float Wikitude.ImageTarget.ComputeDistanceToImageTarget ( ImageTarget  otherTarget)
inline

The physical distance between this target and another image target. This computation only returns reliable values if the .wtc file or the cloud archive included physical image target heights.

Parameters
otherTargetThe image target to which the distance should be calculated.
Returns
The physical distance in millimiters between this target and the otherTarget.

Property Documentation

new long Wikitude.ImageTarget.ID
get

The unique ID of the target. When tracking multiple targets with the same name, this can be used to distinguish between them.

new string Wikitude.ImageTarget.Name
get

The name of the associated target image in the .wtc file.

Vector2 Wikitude.ImageTarget.Scale
get

Normalized scale of the tracked target. Specifies the relation between the x and y scales. One of them is 1.0f, while the other is between 0.0f and 1.0f. Can be used to programmatically scale augmentations to fit targets.