C++ Java Unity
C++ Reference
FusionProviderPlatformInfo Struct Reference

Detailed Description

struct returned from getFusionProviderPlatformInfo()

Experimental:
This struct is part of an experimental API and may be changed or removed in future releases.

The pointers contained in this struct are owned by Vuforia and should be used with caution by the developer. For example do not release the session, do not pause the session, do not reconfigure it, doing so will cause Vuforia's handling of the information from the provider to fail in undefined ways.

A valid value for the session will be available after the camera has been started and it will remain valid until the camera is stopped.

A valid value for the frame will be available after the camera has been started and it will only be valid for the duration of one frame. The caller needs to request the information for every new frame.

It is expected that these calls will be most useful during the rendering phase of the application

Public Member Functions

 FusionProviderPlatformInfo ()
 Constructor to set default values. More...
 

Public Attributes

FUSION_PROVIDER_PLATFORM_TYPE mType
 The type of provider. More...
 
void * mSession
 Pointer to the Provider Session. More...
 
void * mFrame
 Pointer to the Provider Frame. More...
 

Constructor & Destructor Documentation

Constructor to set default values.

Member Data Documentation

The type of provider.

void* mSession

Pointer to the Provider Session.

the caller must cast the mSession pointer to the one appropriate to the the platform they are on. For ARKit use,

Vuforia::FusionProviderInfo info = Vuforia::getFusionProviderInfo();
ARSession* arSession = (__bridge ARSession*)info.mSession;

For ARCore use,

Vuforia::FusionProviderInfo info = Vuforia::getFusionProviderInfo();
ArSession *session = static_cast<ArSession *>(info.mSession);
void* mFrame

Pointer to the Provider Frame.

the caller must cast the mFrame pointer to the one appropriate to the the platform they are on. For ARKit use,

Vuforia::FusionProviderInfo info = Vuforia::getFusionProviderInfo();
ARFrame* arSession = (__bridge ARFrame*)info.mFrame;

Alternatively for ARKit the frame can also be obtained directly from the ARSession, using arSession.currentFrame;

For ARCore use,

Vuforia::FusionProviderInfo info = Vuforia::getFusionProviderInfo();
ArFrame *frame = static_cast<ArFrame *>(info.mFrame);

In ARCore developers must get the ArFrame using this call. Updating the ArSession to get the ArFrame will cause the Vuforia library to enter an undefined state.