Wikitude Unity Plugin
|
Instant Trackers provide markerless 3D tracking of a scene, allowing to place augmentations anywhere in the real world. An Instant Tracker can be in two states: Initializing, during which the tracking origin can be set; and Tracking, during which the scene is being tracker. More...
Public Member Functions | |
void | SetState (InstantTrackingState state) |
Request that the tracker change to a new state. When the tracker actually changes to that state, the OnStateChange will be called. More... | |
void | ConvertScreenCoordinate (Vector2 screenCoordinate) |
Use this method to perform a hit test on the point cloud coming from the instant tracker. The computation is done on a separate thread and the result is passed to OnScreenConversionComputed. More... | |
void | RequestPointCloud () |
Use this method to request the current point cloud from the instant tracker. The computation is done on a separate thread and the result is passed to OnPointCloudRequestFinished. More... | |
Public Attributes | |||||
OnStateChangedEvent | OnStateChanged = new OnStateChangedEvent() | ||||
Called whenever the internal state of the tracker is changed, as a result of calling SetState More... | |||||
OnScreenConversionComputedEvent | OnScreenConversionComputed = new OnScreenConversionComputedEvent() | ||||
Called when a screen conversion computation has finished. More... | |||||
OnPointCloudRequestFinishedEvent | OnPointCloudRequestFinished = new OnPointCloudRequestFinishedEvent() | ||||
Called when the point cloud request has finished. More... | |||||
Public Attributes inherited from Wikitude.TrackerBehaviour | |||||
OnTargetsLoadedEvent | OnTargetsLoaded = new OnTargetsLoadedEvent() | ||||
Called when a tracker was successfully initialized. More... | |||||
OnErrorLoadingTargetsEvent | OnErrorLoadingTargets = new OnErrorLoadingTargetsEvent() | ||||
Called when the tracker could not be initialized.
| |||||
Properties | |
float | DeviceHeightAboveGround [get, set] |
Allows changing the estimated height at which the device is currently above the ground in meters. Setting this to an appropriate value will allow the augmentations to have a scale close to the one they would have in reality. Can only be set if the tracker is in the Initializing state. More... | |
InstantTrackingPlaneOrientation | TrackingPlaneOrientation [get, set] |
Gets or sets the tracking plane orientation with which instant tracking initializes. If the plane orientation is set to custom, then the TrackingPlaneOrientationAngle will be used. Can only be set if the tracker is in the Initializing state. More... | |
float | TrackingPlaneOrientationAngle [get, set] |
Gets or sets the tracking plane orientation angle in degrees. Can only be set while the tracker is in Initializing state. It is only considered if the TrackingPlaneOrientation is set to Custom. Valid values are between -360 and 360 degrees. More... | |
Instant Trackers provide markerless 3D tracking of a scene, allowing to place augmentations anywhere in the real world. An Instant Tracker can be in two states: Initializing, during which the tracking origin can be set; and Tracking, during which the scene is being tracker.
When Instant 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.
|
inline |
Use this method to perform a hit test on the point cloud coming from the instant tracker. The computation is done on a separate thread and the result is passed to OnScreenConversionComputed.
screenCoordinate | The 2D screen coordinate that should be converted |
|
inline |
Use this method to request the current point cloud from the instant tracker. The computation is done on a separate thread and the result is passed to OnPointCloudRequestFinished.
|
inline |
Request that the tracker change to a new state. When the tracker actually changes to that state, the OnStateChange will be called.
state | The requested state to which the tracker should transition. |
OnPointCloudRequestFinishedEvent Wikitude.InstantTracker.OnPointCloudRequestFinished = new OnPointCloudRequestFinishedEvent() |
Called when the point cloud request has finished.
pointCloud | The array of 3D points that form the current point cloud. |
OnScreenConversionComputedEvent Wikitude.InstantTracker.OnScreenConversionComputed = new OnScreenConversionComputedEvent() |
Called when a screen conversion computation has finished.
success | Indicates if the computation succeeded or not. |
screenCoordinate | The original screen coordinate that requested the conversion. |
pointCloudCoordinate | The converted 3D coordinate in the local space of the trackable. |
OnStateChangedEvent Wikitude.InstantTracker.OnStateChanged = new OnStateChangedEvent() |
Called whenever the internal state of the tracker is changed, as a result of calling SetState
state | The current state of the tracker. |
|
getset |
Allows changing the estimated height at which the device is currently above the ground in meters. Setting this to an appropriate value will allow the augmentations to have a scale close to the one they would have in reality. Can only be set if the tracker is in the Initializing state.
|
getset |
Gets or sets the tracking plane orientation with which instant tracking initializes. If the plane orientation is set to custom, then the TrackingPlaneOrientationAngle will be used. Can only be set if the tracker is in the Initializing state.
|
getset |
Gets or sets the tracking plane orientation angle in degrees. Can only be set while the tracker is in Initializing state. It is only considered if the TrackingPlaneOrientation is set to Custom. Valid values are between -360 and 360 degrees.