Wikitude Unity Expert Edition
Public Member Functions | Properties | List of all members
Wikitude.ObjectTracker Class Reference

Object Trackers are used to recognize and track objects defined in .wto files by using a TargetCollectionResource More...

Inheritance diagram for Wikitude.ObjectTracker:
Wikitude.Tracker

Public Member Functions

void UpdateAlignmentPose (Matrix4x4 pose)
 Sends an update of the alignments pose to the SDK if alignment initialization has been chosen as the recognition type by setting ObjectTracker.UseAlignmentInitialization. More...
 

Properties

TargetCollectionResource TargetCollectionResource [get, set]
 The Target Collection Resource that will load the .wto file that contains the objects that should be tracked. More...
 
int MaximumNumberOfConcurrentTrackableTargets [get, set]
 An integer value denoting how many concurrent targets are to be recognized and tracked simultaneously. Depending on the current device, more targets can be recognized and tracked at the same time. It's best to set this to the lowest number required by your use case. The Wikitude SDK will stop searching for new object targets in case the limit is reached which results in better performance and longer battery life. If you don't need to track multiple targets at the same time, this value should be set to 1. Has to be set before OnEnable is called, otherwise it will have no effect. More...
 
TrackerEfficiencyMode TrackerEfficiencyMode [get, set]
 Defines the efficiency mode for the tracker. Has to be set before OnEnable is called, otherwise it will have no effect. More...
 
string TargetNameForAlignmentInitialization [get, set]
 Defines the name for the target of the object tracker to be used for alignment initialization. More...
 
bool UseAlignmentInitialization [get, set]
 Defines if alignment initialization should be used as the recognition type of the object tracker. More...
 

Additional Inherited Members

- Public Attributes inherited from Wikitude.Tracker
OnTargetsLoadedEvent OnTargetsLoaded = new OnTargetsLoadedEvent()
 Called when a tracker was successfully initialized. More...
 
OnErrorLoadingTargetsEvent OnErrorLoadingTargets = new OnErrorLoadingTargetsEvent()
 Called when the targets could not be loaded.

Parameters
errorThe error describing what went wrong.
More...
 
OnInitializationErrorEvent OnInitializationError = new OnInitializationErrorEvent()
 Called when the tracker could not be initialized.

Parameters
errorThe error describing what went wrong.
More...
 

Detailed Description

Object Trackers are used to recognize and track objects defined in .wto files by using a TargetCollectionResource

When Object Trackers are created at runtime, make sure that all the relevant properties are set before the OnEnable method is called by Unity. At OnEnable, the native tracker is created and all information needs to be available.

Member Function Documentation

void Wikitude.ObjectTracker.UpdateAlignmentPose ( Matrix4x4  pose)
inline

Sends an update of the alignments pose to the SDK if alignment initialization has been chosen as the recognition type by setting ObjectTracker.UseAlignmentInitialization.

Parameters
poseThe pose of the alignment should contain its location, rotation and scale. The inputted scale should be set to 1 on all axes and the translation - or better said, the distance from the camera - should be adjusted for scaling purposes.

Property Documentation

int Wikitude.ObjectTracker.MaximumNumberOfConcurrentTrackableTargets
getset

An integer value denoting how many concurrent targets are to be recognized and tracked simultaneously. Depending on the current device, more targets can be recognized and tracked at the same time. It's best to set this to the lowest number required by your use case. The Wikitude SDK will stop searching for new object targets in case the limit is reached which results in better performance and longer battery life. If you don't need to track multiple targets at the same time, this value should be set to 1. Has to be set before OnEnable is called, otherwise it will have no effect.

TargetCollectionResource Wikitude.ObjectTracker.TargetCollectionResource
getset

The Target Collection Resource that will load the .wto file that contains the objects that should be tracked.

string Wikitude.ObjectTracker.TargetNameForAlignmentInitialization
getset

Defines the name for the target of the object tracker to be used for alignment initialization.

TrackerEfficiencyMode Wikitude.ObjectTracker.TrackerEfficiencyMode
getset

Defines the efficiency mode for the tracker. Has to be set before OnEnable is called, otherwise it will have no effect.

bool Wikitude.ObjectTracker.UseAlignmentInitialization
getset

Defines if alignment initialization should be used as the recognition type of the object tracker.