Classes | |
struct | VuRenderState |
Vuforia Render State. More... | |
Typedefs | |
typedef struct VuState_ | VuState |
Vuforia State handle. | |
typedef void | VuStateHandler(const VuState *state, void *clientData) |
Vuforia State handler function type. | |
typedef struct VuCameraFrame_ | VuCameraFrame |
Vuforia Camera Frame. | |
typedef struct VuDepthFrame_ | VuDepthFrame |
Vuforia Depth Frame. | |
Functions | |
VuResult | vuEngineAcquireLatestState (const VuEngine *engine, VuState **state) |
Return new state from Vuforia Engine (make sure to call release if you use this function) | |
VuResult | vuStateRelease (VuState *state) |
Release the given state. | |
VuResult | vuStateAcquireReference (const VuState *state, VuState **stateOut) |
Acquire a new reference to the given state. | |
VuResult | vuEngineRegisterStateHandler (VuEngine *engine, VuStateHandler *handler, void *clientData) |
Register a state handler to get Vuforia State updates. | |
VuResult | vuStateGetObservations (const VuState *state, VuObservationList *list) |
Get a list of observations from the state. | |
VuResult | vuStateGetObservationsWithPoseInfo (const VuState *state, VuObservationList *list) |
Get all observations from the Vuforia State that contain pose information. | |
VuResult | vuStateGetObservationsByObserver (const VuState *state, const VuObserver *observer, VuObservationList *list) |
Get all observations from the state associated to a given observer. | |
VuResult | vuStateGetCameraIntrinsics (const VuState *state, VuCameraIntrinsics *cameraIntrinsics) |
Get the camera intrinsics from the state. | |
VuBool | vuStateHasCameraFrame (const VuState *state) |
Return true if the state contains camera frame data. | |
VuResult | vuStateGetCameraFrame (const VuState *state, VuCameraFrame **cameraFrame) |
Get the camera frame from the state. | |
VuResult | vuCameraFrameGetIndex (const VuCameraFrame *cameraFrame, int64_t *index) |
Get index from a camera frame. | |
VuResult | vuCameraFrameGetTimestamp (const VuCameraFrame *cameraFrame, int64_t *timestamp) |
Get timestamp from a camera frame. | |
VuResult | vuCameraFrameGetImages (const VuCameraFrame *cameraFrame, VuImageList *list) |
Get camera image list from a camera frame. | |
VuBool | vuStateHasDefaultDepthFrame (const VuState *state) |
Return VU_TRUE if the state contains a depth frame of the type Vuforia Engine uses by default on this device. | |
VuResult | vuStateGetDefaultDepthFrame (const VuState *state, VuDepthFrame **depthFrame) |
Get the default depth frame (as used by Vuforia Engine) from the state. | |
VuResult | vuDepthFrameGetDepthMap (const VuDepthFrame *depthFrame, VuImage **depthMap) |
Get the depth map image from the depth frame. | |
VuResult | vuDepthFrameGetConfidenceMap (const VuDepthFrame *depthFrame, VuImage **confidenceMap) |
Get the confidence map image from the depth frame. | |
VuResult | vuStateGetRenderState (const VuState *state, VuRenderState *renderState) |
Get the render state from the Vuforia state. | |
The Vuforia State represents a snapshot of what Vuforia Engine "knows" about the user's environment. It contains all information Vuforia clients need to render an AR scene, including observations, camera and rendering information. Individual state information elements can be retrieved from VuState with the respective vuStateGet* getter functions, e.g. vuStateGetObservations() acquires the current list of observations generated by observers. VuState objects are immutable and their data cannot be changed after creation.
There are 2 ways to obtain the latest Vuforia State from the Vuforia Engine:
The VuState object acquired via the pull mechanism remains valid as long as the Engine instance is valid or until vuStateRelease() is called to release the internal state data. The VuState object received via the push mechanism remains valid during the scope of the callback.
If you wish to extend the lifetime beyond its original scope (e.g. to preserve state data outside the state handler callback), you need to create a state reference. You can create any number of references to a VuState instance by calling vuStateAcquireReference(). A state reference contains the same immutable information as the VuState it has been created from but its lifetime becomes independent from it. This means that even if you call vuStateRelease() on a given VuState, a reference created from it beforehand remains valid until vuStateRelease() is called on the state reference.
typedef struct VuDepthFrame_ VuDepthFrame |
Vuforia Depth Frame.
Return new state from Vuforia Engine (make sure to call release if you use this function)
VuResult vuEngineRegisterStateHandler | ( | VuEngine * | engine, |
VuStateHandler * | handler, | ||
void * | clientData ) |
Register a state handler to get Vuforia State updates.
The registered handler function will report the Vuforia State including observations, camera and rendering information at the camera frame rate.
engine | Engine instance |
handler | The handler for receiving state updates |
clientData | The client data to pass with the state updates |
VuResult vuStateGetObservationsWithPoseInfo | ( | const VuState * | state, |
VuObservationList * | list ) |
Get all observations from the Vuforia State that contain pose information.
VuResult vuStateGetObservationsByObserver | ( | const VuState * | state, |
const VuObserver * | observer, | ||
VuObservationList * | list ) |
Get all observations from the state associated to a given observer.
Returns all observations from the state that have been created by a given observer.
state | The state containing the observations. |
observer | The observer to use as a filter for the observations. |
list | The list to fill with the observations found. |
Return true if the state contains camera frame data.
VuResult vuStateGetCameraFrame | ( | const VuState * | state, |
VuCameraFrame ** | cameraFrame ) |
Get the camera frame from the state.
Return VU_TRUE if the state contains a depth frame of the type Vuforia Engine uses by default on this device.
VuResult vuStateGetDefaultDepthFrame | ( | const VuState * | state, |
VuDepthFrame ** | depthFrame ) |
Get the default depth frame (as used by Vuforia Engine) from the state.
VuResult vuDepthFrameGetDepthMap | ( | const VuDepthFrame * | depthFrame, |
VuImage ** | depthMap ) |
Get the depth map image from the depth frame.
VuResult vuDepthFrameGetConfidenceMap | ( | const VuDepthFrame * | depthFrame, |
VuImage ** | confidenceMap ) |
Get the confidence map image from the depth frame.
VuResult vuStateGetRenderState | ( | const VuState * | state, |
VuRenderState * | renderState ) |
Get the render state from the Vuforia state.