Class ImageTarget
A class that represents image targets that are found by an image tracker.
Inheritance
Namespace: wikitude.sdk.uwp
Assembly: wikitude.sdk.dll
Syntax
public sealed class ImageTarget
Methods
getDistanceTo(ImageTarget)
Gets the physical distance between two image targets
Declaration
public int getDistanceTo(ImageTarget otherTarget)
Parameters
Type | Name | Description |
---|---|---|
ImageTarget | otherTarget | The image target to which the distance should be calculated to. |
Returns
Type | Description |
---|---|
System.Int32 | The physical distance in millimeter between this target and otherTarget. |
getDistanceToTarget()
Gets the distance from the camera to the image target in millimeter.
This value only contains reliable values if the .wtc file or the cloud archive included physical image target heights.
Declaration
public int getDistanceToTarget()
Returns
Type | Description |
---|---|
System.Int32 | The physical distance in millimeter between the camera and the image target. |
getMatrix()
Gets the combined modelview matrix that should be applied to augmentations when rendering.
Declaration
public Matrix getMatrix()
Returns
Type | Description |
---|---|
Matrix | The matrix that should be applied to the target augmentation when rendering. |
getName()
Gets the name of the associated target image in the wikitude target collection(.wtc).
Declaration
public string getName()
Returns
Type | Description |
---|---|
System.String | The name of the image target. |
getPhysicalTargetHeight()
Gets the physical height of the image target as it is defined in the .wtc or through the ImageTrackerConfiguration property set with wikitude.sdk.uwp.ImageTrackerConfiguration.setPhysicalTargetImageHeights(Windows.Foundation.Collections.IMap`2{System.String^,System.Int32}).
Declaration
public int getPhysicalTargetHeight()
Returns
Type | Description |
---|---|
System.Int32 | The physical target height in millimeter. |
getTargetScale()
Gets a scale value that represents the image dimensions proportionally to the uniform scaling given through the matrix returned from getMatrix()
Declaration
public Vector2 getTargetScale()
Returns
Type | Description |
---|---|
System.Numerics.Vector2 | The normalized scale of the image target. |
getUniqueId()
Gets the unique id of the ImageTarget. This unique id is incremented with every recognition of the same target.
Declaration
public long getUniqueId()
Returns
Type | Description |
---|---|
System.Int64 | The unique id of the image target. |
Events
DistanceToTargetChanged
This event is fired when the distance between this and other ImageTargets changes.
Declaration
public event DistanceToTargetChangedHandler DistanceToTargetChanged
Event Type
Type | Description |
---|---|
DistanceToTargetChangedHandler |