Wikitude Unity Expert Edition
Public Member Functions | Public Attributes | 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...
 

Public Attributes

new string Name => base.Name
 The name of the associated target image in the .wtc file. More...
 
new long TargetId => base.TargetId
 The unique ID of the target. When tracking multiple targets with the same name, this can be used to distinguish between them. More...
 
ImageTargetType TargetType => _targetType
 The type of this ImageTarget. Can be either a cylinder of a planar image target. More...
 
float TargetCircumferenceBase => _targetCircumferenceBase
 The circumference multiplier of the target, in case this is a cylinder target. A value of 1 indicates a fully circular cylinder target, while a value of 2 corresponds to a semi-circular cylinder. More...
 
Vector2 Scale => _scale
 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...
 
- 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 millimeters 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 millimeters between this target and the otherTarget.

Member Data Documentation

new string Wikitude.ImageTarget.Name => base.Name

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

Vector2 Wikitude.ImageTarget.Scale => _scale

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.

float Wikitude.ImageTarget.TargetCircumferenceBase => _targetCircumferenceBase

The circumference multiplier of the target, in case this is a cylinder target. A value of 1 indicates a fully circular cylinder target, while a value of 2 corresponds to a semi-circular cylinder.

new long Wikitude.ImageTarget.TargetId => base.TargetId

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

ImageTargetType Wikitude.ImageTarget.TargetType => _targetType

The type of this ImageTarget. Can be either a cylinder of a planar image target.