C++ Java Unity
Unity Reference
PositionalDeviceTracker Class Referenceabstract

The PositionalDeviceTracker tracks a device in the world by relying on 6DOF sensor tracking, delivering both position and rotation. The PositionalDeviceTracker controls position and rotation of the camera in the Unity scene using a physical unit (meter). More...

Inheritance diagram for PositionalDeviceTracker:
DeviceTracker Tracker

Public Member Functions

abstract Anchor CreateMidAirAnchor (string name, Vector3 position, Quaternion rotation)
 Creates an Anchor Trackable for MidAir using the Transform of the pose (position/rotation) where it should be anchored. More...
 
abstract Anchor CreatePlaneAnchor (string name, HitTestResult hitTestResult)
 Creates an Anchor Trackable on a Plane using the HitTestResult of a previous SmartTerrain.HitTest of the (position/rotation) where it should be anchored. More...
 
abstract void RegisterAnchorRemovedCallback (Action< Anchor > onAnchorRemovedAction)
 Register for the event of when an Anchor is removed and no longer being tracked, for example after pause/resume in some cases More...
 
abstract bool Reset ()
 Reset the tracker On some platforms a new world coordinate system may be created with the device's current position and orientation as the origin. On some platforms the underlying Vuforia Fusion provider may also be reset. Any internal data will be destroyed. All created anchors will be destroyed. It is recommended to call ResetAnchors() afterwards.

Returns
true if the positional device tracker correctly reset
More...
 
abstract void ResetAnchors ()
 Reset all anchors in the current scene. By default, the ContentPositioningBehaviour will delete all Anchors it has created. If the ContentPositioningBehaviour is not use, the anchors must be dealt with explicitly by registering to the Callbacks 'RegisterAnchorRemovedCallback' and 'UnregisterAnchorRemovedCallback' More...
 
abstract void UnregisterAnchorRemovedCallback (Action< Anchor > onAnchorRemovedAction)
 Unregister for the event of when an Anchor is removed and no longer being tracked, for example after pause/resume in some cases More...
 
- Public Member Functions inherited from Tracker
abstract bool Start ()
 Starts the Tracker More...
 
abstract void Stop ()
 Stops the Tracker More...
 

Additional Inherited Members

- Properties inherited from Tracker
virtual bool IsActive [get]
 If the Tracker is currently active More...
 

Detailed Description

The PositionalDeviceTracker tracks a device in the world by relying on 6DOF sensor tracking, delivering both position and rotation. The PositionalDeviceTracker controls position and rotation of the camera in the Unity scene using a physical unit (meter).

Member Function Documentation

abstract Anchor CreateMidAirAnchor ( string  name,
Vector3  position,
Quaternion  rotation 
)
pure virtual

Creates an Anchor Trackable for MidAir using the Transform of the pose (position/rotation) where it should be anchored.

When using VUFORIA_SENSOR_FUSION, Anchors created with this method are not guaranteed to receive any further position updates after the device tracker recovers from a limited tracking state.

Parameters
nameThe logical name of the anchor. This must be unique among all created anchors.
transformThe transform of the pose at which the anchor will be created
Returns
Anchor that can be used to configure an AnchorBehaviour
abstract Anchor CreatePlaneAnchor ( string  name,
HitTestResult  hitTestResult 
)
pure virtual

Creates an Anchor Trackable on a Plane using the HitTestResult of a previous SmartTerrain.HitTest of the (position/rotation) where it should be anchored.

Parameters
nameThe logical name of the anchor. This must be unique among all created anchors.
hitTestResultThe HitTestResult containing the pose at which the anchor will be created on a plane
Returns
Anchor that can be used to configure an AnchorBehaviour
abstract void RegisterAnchorRemovedCallback ( Action< Anchor onAnchorRemovedAction)
pure virtual

Register for the event of when an Anchor is removed and no longer being tracked, for example after pause/resume in some cases

Parameters
onAnchorRemovedAction
abstract bool Reset ( )
pure virtual

Reset the tracker On some platforms a new world coordinate system may be created with the device's current position and orientation as the origin. On some platforms the underlying Vuforia Fusion provider may also be reset. Any internal data will be destroyed. All created anchors will be destroyed. It is recommended to call ResetAnchors() afterwards.

Returns
true if the positional device tracker correctly reset

abstract void ResetAnchors ( )
pure virtual

Reset all anchors in the current scene. By default, the ContentPositioningBehaviour will delete all Anchors it has created. If the ContentPositioningBehaviour is not use, the anchors must be dealt with explicitly by registering to the Callbacks 'RegisterAnchorRemovedCallback' and 'UnregisterAnchorRemovedCallback'

abstract void UnregisterAnchorRemovedCallback ( Action< Anchor onAnchorRemovedAction)
pure virtual

Unregister for the event of when an Anchor is removed and no longer being tracked, for example after pause/resume in some cases

Parameters
onAnchorRemovedAction