WTImageTarget Class Reference

Inherits from WTTarget : NSObject
Conforms to NSCopying
Declared in WTImageTarget.h

Overview

WTImageTarget represents image targets that are found by an image tracker.

This class should not be instantiated from outside of the Wikitude Native SDK.

  delegate

The object that acts as a delegate for the WTImageTarget

@property (nonatomic, weak) id<WTImageTargetDelegate> delegate

Discussion

The object that acts as a delegate for the WTImageTarget

Declared In

WTImageTarget.h

  name

The name of the associated target image in the wikitude target collection (.wtc).

@property (nonatomic, strong, readonly) NSString *name

Return Value

name The name of the image target

Discussion

The name of the associated target image in the wikitude target collection (.wtc).

Declared In

WTImageTarget.h

  uniqueId

The unique id of the ImageTarget. This unique id is incremented with every recognition of the same target.

@property (nonatomic, assign, readonly) long uniqueId

Return Value

uniqueId The unique id of the image target

Discussion

The unique id of the ImageTarget. This unique id is incremented with every recognition of the same target.

Declared In

WTImageTarget.h

  xScale

Defines a normalized scale value in x direction that represents the image dimensions proportionally to the uniform scaling given through the modelView matrix

@property (nonatomic, assign, readonly) CGFloat xScale

Return Value

xScale normalized scale in x direction

Discussion

Defines a normalized scale value in x direction that represents the image dimensions proportionally to the uniform scaling given through the modelView matrix

Declared In

WTImageTarget.h

  yScale

Defines a normalized scale value in y direction that represents the image dimensions proportionally to the uniform scaling given through the modelView matrix

@property (nonatomic, assign, readonly) CGFloat yScale

Return Value

xScale normalized scale in y direction

Discussion

Defines a normalized scale value in y direction that represents the image dimensions proportionally to the uniform scaling given through the modelView matrix

Declared In

WTImageTarget.h

  physicalTargetHeight

The physical height of the image target as it is defined in the .wtc or through the WTImageTrackerConfiguration property physicalTargetImageHeights

@property (nonatomic, assign, readonly) NSUInteger physicalTargetHeight

Return Value

physicalTargetHeight the physical target height in millimeter

Discussion

The physical height of the image target as it is defined in the .wtc or through the WTImageTrackerConfiguration property physicalTargetImageHeights

Declared In

WTImageTarget.h

  distanceToTarget

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.

@property (nonatomic, assign, readonly) NSUInteger distanceToTarget

Return Value

distanceToTarget The physical distance in millimeter between the camera and the image target.

Declared In

WTImageTarget.h

– distanceTo:

Use this method to calculate the physical distance between two image targets

The distance is calculated every time the method is called. In case the distance could not be calculated (imageTarget is nil), 0 is returned.

- (CGFloat)distanceTo:(WTImageTarget *)imageTarget

Parameters

imageTarget

The image target to which the distance should be calculated to

Return Value

The physical distance in millimeter between this target and imageTarget

Declared In

WTImageTarget.h