C++ Java Unity
C++ Reference
ExternalPositionalDeviceTracker Class Referenceabstract

Detailed Description

Interface used by Vuforia to interact with the external positional device tracker implementation.

The sequence of events between Vuforia and the external positional device tracker implementation is as follows:

  1. Vuforia calls VuforiaDriver::createExternalPositionalDeviceTracker() when the driver capability includes CAMERA_POSE.
  2. The implementation creates an ExternalPositionalDeviceTracker instance and returns it to Vuforia.
  3. Vuforia calls ExternalPositionalDeviceTracker::open() on the returned instance.
  4. Vuforia calls ExternalPositionalDeviceTracker::start(), which starts the flow of poses into the provided PoseCallback.
  5. On shutdown Vuforia calls -> ExternalPositionalDeviceTracker::stop() -> ExternalPositionalDeviceTracker::close() -> and finally VuforiaDriver::destroyExternalPositionalDeviceTracker().

Public Member Functions

virtual bool VUFORIA_DRIVER_CALLING_CONVENTION open ()=0
 open the external positional device tracker. More...
 
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION close ()=0
 close the external positional device tracker. More...
 
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION start (PoseCallback *cb, AnchorCallback *acb=nullptr)=0
 start the external positional device tracker. More...
 
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION stop ()=0
 stop the external positional device tracker. More...
 
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION resetTracking ()=0
 notify external positional device tracker to reset tracking the world/pose. More...
 
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION isAnchorSupported ()
 Query the driver to check if it supports anchors. More...
 
virtual const char *VUFORIA_DRIVER_CALLING_CONVENTION createAnchor (AnchorPose *anchorPose)
 Create an anchor for the given pose. More...
 
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION removeAnchor (const char *uuid)
 Remove the Anchor for the given UUID. More...
 

Member Function Documentation

virtual bool VUFORIA_DRIVER_CALLING_CONVENTION open ( )
pure virtual

open the external positional device tracker.

Returns
True if the external positional device tracker is opened successfully, otherwise false.
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION close ( )
pure virtual

close the external positional device tracker.

Returns
True if the external positional device tracker is closed successfully, otherwise false.
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION start ( PoseCallback cb,
AnchorCallback acb = nullptr 
)
pure virtual

start the external positional device tracker.

Parameters
cbCallback that the pose should be delivered to.
acbAnchor callback to be notified when anchors are updated.
Returns
True if the external positional device tracker was started, otherwise false.
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION stop ( )
pure virtual

stop the external positional device tracker.

Returns
True if the external positional device tracker was stopped, otherwise false. Once the stop returns true, driver implementation should stop pushing additional poses via PoseCallback. PoseCallback should be considered as invalid once stop returns true.
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION resetTracking ( )
pure virtual

notify external positional device tracker to reset tracking the world/pose.

Returns
True if the external positional device tracker is successful in resetting tracking else returns false.
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION isAnchorSupported ( )
inlinevirtual

Query the driver to check if it supports anchors.

Returns
True if the anchors are supported else returns false. Anchor support is an optional feature, so, default implementation is to return false.
virtual const char* VUFORIA_DRIVER_CALLING_CONVENTION createAnchor ( AnchorPose *  anchorPose)
inlinevirtual

Create an anchor for the given pose.

Parameters
anchorPoseAn anchor pose.
Returns
UUID (char*) if successful in creating an anchor. Anchor support is an optional feature, so, default implementation is to return nullptr.
virtual bool VUFORIA_DRIVER_CALLING_CONVENTION removeAnchor ( const char *  uuid)
inlinevirtual

Remove the Anchor for the given UUID.

Parameters
uuidUUID of the anchor to be removed. This UUID was obtained via successful call to createAnchor.
Returns
True if successful in removing Anchor else returns false. Anchor support is an optional feature, so, default implementation is to return false.