C++ Java Unity
C++ Reference
Vuforia Namespace Reference

Namespaces

 Impl
 Implementation detail namespace - iterator type, iterator operations.
 
 Tool
 Various geometry and linear algebra utility functions.
 

Classes

class  Anchor
 A type of Trackable that represents a spatial anchor point. More...
 
class  AnchorResult
 Tracking data resulting from tracking an Anchor. More...
 
class  Area
 Base class for any 2D shapes used in Vuforia. More...
 
class  Box3D
 A 3D axis-aligned bounding box (AABB). More...
 
class  CameraCalibration
 Represents intrinsic parameters for a particular camera and lens configuration. More...
 
class  CameraDevice
 Provides access to the device's built-in camera. More...
 
class  CameraField
 Represents advanced properties of the camera. More...
 
class  CustomViewerParameters
 Editable container class for parameters used to define a Viewer. More...
 
class  CylinderTarget
 A type of ObjectTarget that represents a cylindrical or conical object. More...
 
class  CylinderTargetResult
 Tracking data resulting from tracking a CylinderTarget. More...
 
class  DataSet
 A container of data for one or more Trackable instances. More...
 
class  Device
 Singleton representation of the device Vuforia is currently running on. More...
 
class  DeviceTrackable
 A type of Trackable that tracks the pose of the device. More...
 
class  DeviceTrackableResult
 Tracking data generated by a DeviceTracker. More...
 
class  DeviceTracker
 Tracks the device that Vuforia is running on in the user's environment. More...
 
class  DXRenderData
 DirectX-specific rendering data. More...
 
class  DXTextureData
 DirectX-specific texture data. More...
 
class  EyewearCalibrationProfileManager
 Functionality to manage calibration profiles for see-through eyewear devices. More...
 
struct  EyewearCalibrationReading
 Structure for an eyewear calibration reading to be used with EyewearUserCalibration. More...
 
class  EyewearDevice
 A type of Device which is used when Vuforia runs on dedicated eyewear. More...
 
class  EyewearUserCalibrator
 A class for creating custom user calibration procedures for see-through eyewear. More...
 
class  Frame
 A collection of different representations of a single image captured from a camera. More...
 
class  GLTextureData
 OpenGL-specific texture data. More...
 
class  GLTextureUnit
 OpenGL-specific texture unit data. More...
 
class  GuideView
 A simplified visual representation of a ModelTarget to guide user initialization. More...
 
class  HandheldTransformModel
 A type of TransformModel specialized for handheld tracking. More...
 
class  HeadTransformModel
 A type of TransformModel specialized for head-mounted tracking. More...
 
class  HitTestResult
 The result of a hit test performed by a SmartTerrain. More...
 
class  Illumination
 Abstract representation of the illumination for a particular frame. More...
 
class  Image
 Represents an image, typically as returned by the CameraDevice. More...
 
class  ImageTarget
 A type of ObjectTarget that represents a 2D image or a planar object. More...
 
class  ImageTargetBuilder
 A helper class for creating ImageTarget instances from runtime data. More...
 
class  ImageTargetResult
 Tracking data resulting from tracking an ImageTarget. More...
 
class  InstanceId
 The ID of a particular VuMark instance. More...
 
class  List
 Vuforia's List container. More...
 
class  ListDataProvider
 Abstract base class for list data providers defined by Vuforia. More...
 
struct  Matrix34F
 Matrix with 3 rows and 4 columns of float items. More...
 
struct  Matrix44F
 Matrix with 4 rows and 4 columns of float items. More...
 
class  Mesh
 A triangular mesh with support for optional vertex positions, UVs, and normals. More...
 
class  MetalRenderData
 Metal-specific render data. More...
 
class  MetalTextureData
 Metal-specific texture data. More...
 
class  MetalTextureUnit
 Metal-specific texture unit. More...
 
class  ModelTarget
 A type of ObjectTarget that recognizes and tracks objects by shape using existing 3D models. More...
 
class  ModelTargetResult
 Tracking data resulting from tracking a ModelTarget. More...
 
class  MultiTarget
 A type of ObjectTarget that represents an object constructed from multiple component Trackables. More...
 
class  MultiTargetResult
 Tracking data resulting from tracking a MultiTarget. More...
 
class  NonCopyable
 Base class for objects that cannot be copied. More...
 
class  Obb2D
 A 2D oriented bounding box. More...
 
class  Obb3D
 A 3D oriented bounding box. More...
 
class  ObjectTarget
 A type of Trackable that represents a real-world object. More...
 
class  ObjectTargetResult
 Tracking data resulting from tracking an ObjectTarget. More...
 
class  ObjectTracker
 A type of Tracker that tracks objects in the real world. More...
 
class  PositionalDeviceTracker
 A type of DeviceTracker that tracks the world-relative position and rotation of the device. More...
 
class  Rectangle
 A 2D rectangular area, expressed in real (float) coordinates. More...
 
class  RectangleInt
 A 2D rectangular area, expressed in integer coordinates. More...
 
class  RenderData
 Base class used when passing 3D graphics rendering API specific data to Vuforia. More...
 
class  Renderer
 A helper class that provides common AR related rendering tasks. More...
 
class  RenderingPrimitives
 Provides low-level information and tools for rendering AR and VR content. More...
 
class  RotationalDeviceTracker
 A type of DeviceTracker that tracks the world-relative rotation of a device. More...
 
class  SmartTerrain
 A type of Tracker that collects information about the user's environment at runtime. More...
 
class  State
 A persistent handle to the state of the whole augmented reality system at a given point in time. More...
 
class  StateUpdater
 Provides State instances on-demand. More...
 
class  TargetFinder
 A service that retrieves Targets using cloud-based recognition. More...
 
struct  TargetFinderQueryResult
 Data structure to contain the TargetFinder search results of updateQueryResults() More...
 
class  TargetSearchResult
 A search result returned from a TargetFinder. More...
 
class  TextureData
 Base class used for passing texture data to Vuforia. More...
 
class  TextureUnit
 Base class used for passing texture unit data to Vuforia. More...
 
class  Trackable
 Base class for all objects that can be tracked. More...
 
class  TrackableResult
 Base class for data about actively tracked objects. More...
 
class  TrackableSource
 An opaque handle for creating a new Trackable in a DataSet. More...
 
class  Tracker
 Base class for all Trackers. More...
 
class  TrackerManager
 Singleton for initializing, accessing, and deinitializing Tracker objects. More...
 
class  TransformModel
 Base class for transform models used to correct poses based on usage context assumptions. More...
 
class  Type
 Class supporting a Vuforia-internal type system. More...
 
class  UpdateCallback
 Base class for objects passed to Vuforia::registerCallback(). More...
 
struct  Vec2F
 2D vector of real (float) numbers. More...
 
struct  Vec2I
 2D vector of integer numbers. More...
 
struct  Vec3F
 3D vector of real (float) numbers. More...
 
struct  Vec3I
 3D vector of integer numbers. More...
 
struct  Vec4F
 4D vector of real (float) numbers. More...
 
struct  Vec4I
 4D vector of integer numbers. More...
 
struct  VideoBackgroundConfig
 Defines how the video background should be rendered. More...
 
struct  VideoBackgroundTextureInfo
 Defines texture information for rendering the video background. More...
 
struct  VideoMode
 A particular video configuration for the device's camera. More...
 
class  ViewerParameters
 Container class for parameters needed to define a viewer. More...
 
class  ViewerParametersList
 A list of ViewerParameter instances, for use with Device::selectViewer(). More...
 
class  ViewList
 The list of VIEWs that need to be iterated over as part of the rendering process. More...
 
class  VirtualButton
 A virtual button on a Trackable. More...
 
class  VirtualButtonResult
 Tracking data resulting from a VirtualButton. More...
 
class  VuMarkTarget
 A type of ObjectTarget that represents a VuMark. More...
 
class  VuMarkTargetResult
 Tracking data resulting from tracking a VuMarkTarget. More...
 
class  VuMarkTemplate
 A type of ObjectTarget representing a set of VuMarks. More...
 

Typedefs

typedef __uint16_t UInt16
 
typedef __int64_t Int64
 

Enumerations

enum  EYEID {
  EYEID_MONOCULAR =0,
  EYEID_LEFT,
  EYEID_RIGHT,
  EYEID_COUNT
}
 
enum  VIDEO_BACKGROUND_REFLECTION {
  VIDEO_BACKGROUND_REFLECTION_DEFAULT,
  VIDEO_BACKGROUND_REFLECTION_ON,
  VIDEO_BACKGROUND_REFLECTION_OFF
}
 Configuration options for the video background (DEPRECATED) More...
 
enum  VIEW {
  VIEW_SINGULAR,
  VIEW_LEFTEYE,
  VIEW_RIGHTEYE,
  VIEW_POSTPROCESS,
  VIEW_COUNT
}
 View types (used with RenderingPrimitives). More...
 
enum  INIT_FLAGS {
  GL_20 = 1,
  METAL = 2,
  DX_11 = 4,
  GL_30 = 8
}
 Initialization flags. More...
 
enum  INIT_ERRORCODE {
  INIT_ERROR = -1,
  INIT_DEVICE_NOT_SUPPORTED = -2,
  INIT_NO_CAMERA_ACCESS = -3,
  INIT_LICENSE_ERROR_MISSING_KEY = -4,
  INIT_LICENSE_ERROR_INVALID_KEY = -5,
  INIT_LICENSE_ERROR_NO_NETWORK_PERMANENT = -6,
  INIT_LICENSE_ERROR_NO_NETWORK_TRANSIENT = -7,
  INIT_LICENSE_ERROR_CANCELED_KEY = -8,
  INIT_LICENSE_ERROR_PRODUCT_TYPE_MISMATCH = -9,
  INIT_EXTERNAL_DEVICE_NOT_DETECTED = -10,
  INIT_VUFORIA_DRIVER_FAILED = -11
}
 Return codes for init() function. More...
 
enum  PIXEL_FORMAT {
  UNKNOWN_FORMAT = 0,
  RGB565 = 1,
  RGB888 = 2,
  GRAYSCALE = 4,
  YUV = 8,
  RGBA8888 = 16,
  INDEXED = 32
}
 Pixel encoding types. More...
 
enum  HINT {
  HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS = 0,
  HINT_MAX_SIMULTANEOUS_OBJECT_TARGETS = 1,
  HINT_DELAYED_LOADING_OBJECT_DATASETS = 2,
  HINT_ASYNC_FETCH_OF_LATEST_CALIBRATION = 3
}
 Use when calling setHint(). More...
 
enum  STORAGE_TYPE {
  STORAGE_APP,
  STORAGE_APPRESOURCE,
  STORAGE_ABSOLUTE
}
 Controls how paths should be handled when loading DataSet files. More...
 
enum  FUSION_PROVIDER_TYPE {
  FUSION_PROVIDER_INVALID_OPERATION = -1,
  FUSION_PROVIDER_VUFORIA_VISION_ONLY = 1,
  FUSION_PROVIDER_VUFORIA_SENSOR_FUSION = 2,
  FUSION_PROVIDER_PLATFORM_SENSOR_FUSION = 4,
  FUSION_PROVIDER_ALL,
  FUSION_OPTIMIZE_IMAGE_TARGETS_AND_VUMARKS,
  FUSION_OPTIMIZE_MODEL_TARGETS_AND_SMART_TERRAIN = FUSION_PROVIDER_ALL
}
 The kinds of Fusion provider available for Vuforia to use. More...
 
enum  IOS_INIT_FLAGS {
  ROTATE_IOS_90 = 128,
  ROTATE_IOS_180 = 256,
  ROTATE_IOS_270 = 512,
  ROTATE_IOS_0 = 1024
}
 

Functions

int VUFORIA_API init ()
 Initialize Vuforia. More...
 
bool VUFORIA_API isInitialized ()
 Checks whether Vuforia has been already successfully initialized. More...
 
void VUFORIA_API deinit ()
 Deinitialize Vuforia. More...
 
FUSION_PROVIDER_TYPE VUFORIA_API setAllowedFusionProviders (FUSION_PROVIDER_TYPE providerTypes)
 Specify which providers Vuforia Fusion is allowed to select from. More...
 
FUSION_PROVIDER_TYPE VUFORIA_API getActiveFusionProvider ()
 Get the Fusion provider that Vuforia has selected to use. More...
 
bool VUFORIA_API setHint (unsigned int hint, int value)
 Set a configuration hint for the Vuforia SDK. More...
 
void VUFORIA_API registerCallback (UpdateCallback *object)
 Registers an UpdateCallback instance to be notified when Vuforia is updated. More...
 
bool VUFORIA_API setFrameFormat (PIXEL_FORMAT format, bool enabled)
 Enable or disable specific pixel formats for the Frame returned by State::getFrame(). More...
 
int VUFORIA_API getBitsPerPixel (PIXEL_FORMAT format)
 Get the number of bits required to store a single pixel in the given format. More...
 
bool VUFORIA_API requiresAlpha ()
 Get whether the rendering surface should be configured with an alpha channel. More...
 
int VUFORIA_API getBufferSize (int width, int height, PIXEL_FORMAT format)
 Get the number of bytes required for a particular image buffer. More...
 
void VUFORIA_API onResume ()
 Execute Vuforia-specific lifecycle management tasks when the app is resumed. More...
 
void VUFORIA_API onPause ()
 Execute Vuforia-specific lifecycle management tasks when the app is paused. More...
 
void VUFORIA_API onSurfaceCreated ()
 Inform Vuforia that the rendering surface has been created. More...
 
void VUFORIA_API onSurfaceChanged (int width, int height)
 Inform Vuforia about the size of the rendering surface, or that its size has changed. More...
 
VUFORIA_API const char * getLibraryVersion ()
 Get the version of the Vuforia SDK as a C-style string. More...
 
bool VUFORIA_API setDriverLibrary (const char *libraryName, void *userData)
 Set parameters to enable or disable the use of a Vuforia Driver library. More...
 
void VUFORIA_API setInitParameters (jobject activity, int flags, const char *licenseKey)
 Set Vuforia initialization parameters. More...
 
int VUFORIA_API setInitParameters (int flags, const char *licenseKey)
 Set Vuforia initialization parameters. More...
 
void VUFORIA_API setRotation (int rotation)
 Set the current screen orientation. More...
 
void VUFORIA_API setInitParameters (const char *key)
 Set Vuforia initialization parameters. More...
 
void VUFORIA_API setCurrentOrientation (Windows::Graphics::Display::DisplayOrientations orientation)
 Set the current screen orientation. More...
 
bool VUFORIA_API setHolographicAppCS (void *appSpecifiedCS)
 Set the app coordinate system. More...
 

Typedef Documentation

typedef __uint16_t UInt16
typedef __int64_t Int64

Enumeration Type Documentation

enum EYEID
Enumerator
EYEID_MONOCULAR 

Identifier for a monocular (single) eye.

EYEID_LEFT 

Identifier for the left eye.

EYEID_RIGHT 

Identifier for the right eye.

EYEID_COUNT 

Number of EYEID options.

Configuration options for the video background (DEPRECATED)

Deprecated:
This enum is deprecated. Front camera support will be removed in a future Vuforia release.
Enumerator
VIDEO_BACKGROUND_REFLECTION_DEFAULT 

Allows the SDK to set the recommended reflection settings for the current camera (DEPRECATED)

VIDEO_BACKGROUND_REFLECTION_ON 

Overrides the SDK recommendation to force a reflection (DEPRECATED)

VIDEO_BACKGROUND_REFLECTION_OFF 

Overrides the SDK recommendation to disable reflection (DEPRECATED)

enum VIEW

View types (used with RenderingPrimitives).

Enumerator
VIEW_SINGULAR 

Identifier for singular screen on a mobile phone or tablet (HANDHELD device), or the full display in a viewer

VIEW_LEFTEYE 

Identifier for the left display of an HMD, or the left side of the screen when docked in a viewer

VIEW_RIGHTEYE 

Identifier for the right display of an HMD, or the right side of the screen when docked in a viewer

VIEW_POSTPROCESS 

Identifier for the post processing step of VR rendering where the distorted scene is rendered to the screen

VIEW_COUNT 

Max possible number of views.

enum INIT_FLAGS

Initialization flags.

Use when calling init()

Enumerator
GL_20 

Enables OpenGL ES 2.x rendering (not available on UWP platforms)

METAL 

Enables Metal rendering (available only on Apple platforms)

DX_11 

Enables DirectX 11 rendering (available only on UWP platforms)

GL_30 

Enables OpenGL ES 3.x rendering (not available on UWP platforms)

Return codes for init() function.

Enumerator
INIT_ERROR 

Error during initialization.

INIT_DEVICE_NOT_SUPPORTED 

The device is not supported.

INIT_NO_CAMERA_ACCESS 

Cannot access the camera.

INIT_LICENSE_ERROR_MISSING_KEY 

License key is missing.

INIT_LICENSE_ERROR_INVALID_KEY 

Invalid license key passed to SDK.

INIT_LICENSE_ERROR_NO_NETWORK_PERMANENT 

Unable to verify license key due to network (Permanent error)

INIT_LICENSE_ERROR_NO_NETWORK_TRANSIENT 

Unable to verify license key due to network (Transient error)

INIT_LICENSE_ERROR_CANCELED_KEY 

Provided key is no longer valid.

INIT_LICENSE_ERROR_PRODUCT_TYPE_MISMATCH 

Provided key is not valid for this product.

INIT_EXTERNAL_DEVICE_NOT_DETECTED 

Dependent external device not detected/plugged in.

INIT_VUFORIA_DRIVER_FAILED 

Vuforia Driver library failed to open.

Pixel encoding types.

Enumerator
UNKNOWN_FORMAT 

Unknown format - default pixel type for undefined images

RGB565 

A color pixel stored in 2 bytes using 5 bits for red, 6 bits for green and 5 bits for blue

RGB888 

A color pixel stored in 3 bytes using 8 bits each

GRAYSCALE 

A grayscale pixel stored in one byte.

YUV 

A color pixel stored in 12 or more bits using Y, U and V planes

RGBA8888 

A color pixel stored in 32 bits using 8 bits each and an alpha channel.

INDEXED 

One byte per pixel where the value maps to a domain-specific range.

enum HINT

Use when calling setHint().

Enumerator
HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS 

How many image targets to detect and track at the same time.

This hint tells the tracker how many image shall be processed at most at the same time. E.g. if an app will never require tracking more than two targets, this value should be set to 2. Default is: 1.

HINT_MAX_SIMULTANEOUS_OBJECT_TARGETS 

How many object targets to detect and track at the same time.

This hint tells the tracker how many 3D objects shall be processed at most at the same time. E.g. if an app will never require tracking more than 1 target, this value should be set to 1. Default is: 1.

HINT_DELAYED_LOADING_OBJECT_DATASETS 

Force delayed loading for object target DataSet.

This hint tells the tracker to enable delayed loading of object target datasets upon first detection. Loading time of large object dataset will be reduced but the initial detection time of targets will increase. Please note that the hint should be set before loading any object target dataset to be effective. To enable delayed loading set the hint value to 1. To disable delayed loading set the hint value to 0. Default is: 0.

HINT_ASYNC_FETCH_OF_LATEST_CALIBRATION 

Asynchronously fetch the latest device calibration profile.

This hint enables asynchronous fetching of the latest device calibration profile from the cloud, which does not block Vuforia's initialization until the calibration profile is successfully acquired. Skipping the blocking attempt to get the latest profile can cause the SDK to run in a non-optimized mode on the first run. By default, acquiring of the latest device calibration profile may block Vuforia's initialization for up to a maximum timeout of 10 seconds or until a new profile is successfully acquired from the cloud. Please note that the hint should be set before Vuforia's initialization to be effective. To enable asynchronous fetching set the hint value to 1. To disable asynchronous fetching set the hint value to 0. Default is: 0.

Controls how paths should be handled when loading DataSet files.

Enumerator
STORAGE_APP 

Indicates a relative path to an app-local storage location.

STORAGE_APPRESOURCE 

Indicates a relative path to a resource bundled with the application.

STORAGE_ABSOLUTE 

Indicates an absolute path.

The kinds of Fusion provider available for Vuforia to use.

See setAllowedFusionProviders() for more information about Vuforia Fusion.

Enumerator
FUSION_PROVIDER_INVALID_OPERATION 

An invalid call has been made.

This value is returned when making a call to any of the FusionProvider functions at an invalid time. It should not be used as part of setting the allowed Fusion provider.

FUSION_PROVIDER_VUFORIA_VISION_ONLY 

Use vision-based Fusion only.

Please note that not all Vuforia features are supported when using this provider. See setAllowedFusionProviders() for more information.

FUSION_PROVIDER_VUFORIA_SENSOR_FUSION 

Use Vuforia-provided technology for Fusion.

Vuforia will make use of camera and IMU information to try to create a tracking experience that, when compared to FUSION_PROVIDER_VUFORIA_VISION_ONLY, is more robust to erratic motions and sparse or featureless environments.

FUSION_PROVIDER_PLATFORM_SENSOR_FUSION 

Use platform-provided technology for Fusion.

Vuforia will make use of tracking services offered by the underlying platform, such as ARKit on iOS, ARCore on Android, or Windows Holographic on UWP.

FUSION_PROVIDER_ALL 

Automatically select the best provider.

This is the default, and directs Vuforia to select the best technology available on the current device for Vuforia Fusion.

FUSION_OPTIMIZE_IMAGE_TARGETS_AND_VUMARKS 

Optimize Fusion for use with Image Targets and VuMarks.

This mode is for applications using ImageTargets, CylinderTargets, MultiTargets, ObjectTargets, VuMarks and UserDefinedTargets without requiring usage of ModelTargets or SmartTerrain. If the application was previously using the legacy ET tracking API with your targets this is the recommended setting.

FUSION_OPTIMIZE_MODEL_TARGETS_AND_SMART_TERRAIN 

Optimize Fusion for use with Model Targets and SmartTerrain.

This mode is for applications that want to make use of Model Targets or Smart Terrain.

Enumerator
ROTATE_IOS_90 

iOS: Rotates rendering 90 degrees

ROTATE_IOS_180 

iOS: Rotates rendering 180 degrees

ROTATE_IOS_270 

iOS: Rotates rendering 270 degrees

ROTATE_IOS_0 

iOS: Rotates rendering 0 degrees

Function Documentation

int VUFORIA_API Vuforia::init ( )

Initialize Vuforia.

See also
The reference documentation homepage has more general information about Vuforia's app lifecycle. Lifecycle of a Vuforia app

This function makes all the other systems in Vuforia available for use. It should always be the second function that you call (setInitParameters() being the first).

This function should be called in a loop, ideally on a background thread, until it returns either an integer >= 100 or an error code (<0). The background thread is critical on platforms that require user approval to access camera hardware (such as iOS or Android), as the approval process typically requires that the main/UI thread is not blocked.

runOnBackgroundThread({
int initResult = 0;
while (initResult >= 0 && initResult < 100) {
initResult = Vuforia::init();
}
if (initResult < 0) {
... handle error
} else {
... continue initialization
...
}
})
Returns
A number representing either a progress toward completion (0..100) or an error code (<0, see #INIT_ERRORCODE).
bool VUFORIA_API Vuforia::isInitialized ( )

Checks whether Vuforia has been already successfully initialized.

void VUFORIA_API Vuforia::deinit ( )

Deinitialize Vuforia.

See init() for an overview of the full app lifecycle.

FUSION_PROVIDER_TYPE VUFORIA_API Vuforia::setAllowedFusionProviders ( FUSION_PROVIDER_TYPE  providerTypes)

Specify which providers Vuforia Fusion is allowed to select from.

Vuforia Fusion is a feature, introduced with Vuforia 7, that is designed to provide the best possible AR experience on a wide range of devices. Fusion solves the problem of fragmentation in AR-enabling technologies, including cameras, sensors, chipsets, and software frameworks such as ARKit, ARCore and Windows Holographic. It fuses the capabilities of the underlying device with Vuforia features, allowing developers to rely on a single Vuforia API for an optimal AR experience across multiple devices and platforms.

This method provides advanced developers with a way to control which technologies Fusion will use.

Before you pass anything other than FUSION_PROVIDER_ALL, you should have a solid understanding of

  • the functionality offered by the underlying platforms,
  • the technology involved in enabling AR, and
  • the robustness of the various options.

If you restrict Fusion to FUSION_PROVIDER_VUFORIA_VISION_ONLY, Ground Plane will cease to work and ModelTargets will operate in a less robust manner.

Not all Fusion providers are available on all platforms. If none of the allowed Fusion providers are available, FUSION_PROVIDER_VUFORIA_VISION_ONLY will be used as a fallback (even if it is not passed to setAllowedFusionProviders()). Use getActiveFusionProvider() (after Vuforia::init() has succeeded) to find out which Fusion provider is actually in use.

Note
This function must be called before Vuforia::init() if the provider to be changed is FUSION_PROVIDER_PLATFORM_SENSOR_FUSION. FUSION_PROVIDER_VUFORIA_SENSOR_FUSION can be modified after initialization when no trackers have been initialized with TrackerManager::initTracker()
Parameters
providerTypesA single value created by OR'ing together the desired FUSION_PROVIDER_TYPE values. Do not pass FUSION_PROVIDER_INVALID_OPERATION.
Returns
the value passed to providerTypes on success, or FUSION_PROVIDER_INVALID_OPERATION on failure or if Vuforia::init() has already been called.
FUSION_PROVIDER_TYPE VUFORIA_API Vuforia::getActiveFusionProvider ( )

Get the Fusion provider that Vuforia has selected to use.

The active Fusion provider will not change after Vuforia has been initialized.

To selectively enable or disable particular Fusion provider types before initialization, see setAllowedFusionProviders().

Note
This function may only be called after Vuforia::init() has successfully completed.
Returns
The currently used Fusion provider (one of FUSION_PROVIDER_TYPE), or FUSION_PROVIDER_INVALID_OPERATION if Vuforia::init() has not yet been called.
bool VUFORIA_API Vuforia::setHint ( unsigned int  hint,
int  value 
)

Set a configuration hint for the Vuforia SDK.

Hints help the SDK to understand the developer's needs.

Depending on the device or SDK version, certain hints might be ignored.

Parameters
hintThe hint to set (see HINT for possible values).
valueThe value for the hint. For boolean values, pass 1 for true and 0 for false.a
Returns
true if the hint was set successfully, or false if the hint is unknown or deprecated.
void VUFORIA_API Vuforia::registerCallback ( UpdateCallback object)

Registers an UpdateCallback instance to be notified when Vuforia is updated.

The passed-in object's Vuforia_onUpdate() function will be called with a new State instance as soon as Vuforia finishes processing a new camera frame.

You should only use this callback for time-critical operations on the frame, or to perform operations which need to be synchronized to the camera thread (e.g. activating and deactivating DataSet instances on an ObjectTracker).

You should avoid doing any processor intensive work here. The callback is called on the camera thread, which means that Vuforia's tracking pipeline will be blocked from further execution until the callback returns.

For normal use cases, you should use the pull interface to access State instances as part of your rendering loop. See State and StateUpdater for more information.

Only one callback object can be registered. Calling registerCallback() a second time replaces the existing callback object.

Parameters
objectThe object that should receive update callbacks.
bool VUFORIA_API Vuforia::setFrameFormat ( PIXEL_FORMAT  format,
bool  enabled 
)

Enable or disable specific pixel formats for the Frame returned by State::getFrame().

Images in the enabled pixel formats will be available in the list of images returned by Frame::getImages().

By default, the Frame returned by State::getFrame() contains images in whichever pixel formats are required for internal processing. For example, image tracking requires a grayscale image, so if you are doing image tracking the Frame returned by getFrame() will typically include a grayscale image.

If you need a specific format for the frame data (if you are doing your own processing on the image), you can use setFrameFormat() to request this format.

Note
Requesting a specific pixel format may induce additional processing overhead in some cases.
Parameters
formatThe pixel format that you want for frames returned by State::getFrame().
enabledtrue to enable the format, false to disable it.
Returns
true if the pixel format was enabled, false otherwise (check application logs for failure details).
int VUFORIA_API Vuforia::getBitsPerPixel ( PIXEL_FORMAT  format)

Get the number of bits required to store a single pixel in the given format.

Parameters
formatThe format to query.
Returns
The bits per pixel for the given format, or 0 if the format is unknown.
bool VUFORIA_API Vuforia::requiresAlpha ( )

Get whether the rendering surface should be configured with an alpha channel.

int VUFORIA_API Vuforia::getBufferSize ( int  width,
int  height,
PIXEL_FORMAT  format 
)

Get the number of bytes required for a particular image buffer.

Parameters
widthThe width of the image, in pixels.
heightThe height of the image, in pixels.
formatThe pixel format that will be used to store the image.
Returns
The number of bytes required for the specified image buffer, or 0 if the format is unknown.
void VUFORIA_API Vuforia::onResume ( )

Execute Vuforia-specific lifecycle management tasks when the app is resumed.

Note
Only has effect if Vuforia is initialized. See init() for a discussion of the full Vuforia lifecycle.

Call when

  • an application has been started or just come back from the background
  • an application is already active and Vuforia has just been initialized with init()

Executes the following internal tasks:

  • enables rendering
  • applies device-specific internal AR settings (e.g. camera resolution, sensor rate)
  • restarts all motion sensors used by Vuforia if previously running
  • resumes a previously active EyewearDevice (e.g. activates last display mode, starts pose prediction)
void VUFORIA_API Vuforia::onPause ( )

Execute Vuforia-specific lifecycle management tasks when the app is paused.

Note
Only has effect if Vuforia is initialized. See init() for a discussion of the full Vuforia lifecycle.

Call when

  • an application is about to become inactive (e.g. going to background)
  • an application is still active (won't go to background or be stopped) and Vuforia is about to be deinitialized with deinit()

Executes the following internal tasks:

  • disables rendering
  • stops all currently running motion sensors used by Vuforia
  • pauses an active EyewearDevice (e.g. switches display mode to mono, pauses pose prediction)
void VUFORIA_API Vuforia::onSurfaceCreated ( )

Inform Vuforia that the rendering surface has been created.

Note
Only has effect if Vuforia is initialized. See init() for a discussion of the full Vuforia lifecycle.
This function must be called on the rendering thread, with any platform- or device-specific rendering context activated.
Calling this function changes the RenderingPrimitives returned by Device::getRenderingPrimitives(). If you have a cached copy of the RenderingPrimitives, you will need to call Device::getRenderingPrimitives() again to get an updated copy.

You should call this function when the rendering surface/context first becomes available.

Executes the following internal tasks:

void VUFORIA_API Vuforia::onSurfaceChanged ( int  width,
int  height 
)

Inform Vuforia about the size of the rendering surface, or that its size has changed.

You should call this function once after the rendering surface/context has been created for the first time, and again whenever the render surface changes size (e.g. due to you app changing orientation, or a window resize event).

Note
This function must be called on the rendering thread, with any platform- or device-specific rendering context activated. It only has effect if Vuforia is initialized.

Executes the following internal tasks:

  • releases any previously created Vuforia-internal rendering resources.
  • triggers a configuration change in the Vuforia Device that (among other things) enables getRenderingPrimitives() to return valid data for the current rendering surface.
Note
RenderingPrimitives instances obtained via Device::getRenderingPrimitives() will not contain valid data for the current rendering surface unless onSurfaceChanged() has been called first.
VUFORIA_API const char* Vuforia::getLibraryVersion ( )

Get the version of the Vuforia SDK as a C-style string.

bool VUFORIA_API Vuforia::setDriverLibrary ( const char *  libraryName,
void *  userData 
)

Set parameters to enable or disable the use of a Vuforia Driver library.

Sets up the name of the library that Vuforia loads dynamically and uses as an external source of camera or other input data. The library must support the Vuforia Driver API and it must be placed inside the app package to be loaded properly. The exact path depends on the platform:

  • Android: [apk-root-dir]/lib/[architecture]/library.so
  • UWP: [appx-root-dir]/library.dll

This function MUST be called before Vuforia::init() to have any effect. Once the library name has been set and Vuforia::init() is called, Vuforia will try to initialize and use the functionality provided by the Driver.

To disable the Vuforia Driver functionality the following must be done:

Note
This functionality is currently only supported on Android and UWP platforms.
Parameters
libraryNameFull file name of the Vuforia Driver library. This must be a null terminated string with a maximum length of 255 characters. Setting it to nullptr or empty string, will disable the use of the Vuforia Driver functionalty during subsequent calls to Vuforia::init().
userDataArbitrary user defined data to be passed into the library, when it gets loaded. Vuforia only forwards the data and doesn't process it in any way.
Returns
true if Vuforia was in uninitialized state and the parameter was therefore set successfully.
void VUFORIA_API Vuforia::setInitParameters ( jobject  activity,
int  flags,
const char *  licenseKey 
)

Set Vuforia initialization parameters.

Android: Call this function before calling Vuforia::init().

See the "Lifecycle of a Vuforia app" section on the main Vuforia reference page for more information. Lifecycle of a Vuforia app

Parameters
activityThe Activity that Vuforia should run under.
flagsFlags to set. See Vuforia::INIT_FLAGS for appropriate flags.
licenseKeyYour Vuforia license key.
int VUFORIA_API Vuforia::setInitParameters ( int  flags,
const char *  licenseKey 
)

Set Vuforia initialization parameters.

iOS: Call this function before calling Vuforia::init().

See the "Lifecycle of a Vuforia app" section on the main Vuforia reference page for more information. Lifecycle of a Vuforia app

Parameters
flagsFlags to set. See Vuforia::INIT_FLAGS and Vuforia::IOS_INIT_FLAGS for appropriate flags.
licenseKeyYour Vuforia license key.
Returns
an integer result code: 0 for success, non-zero for failure (check application logs for failure details).
void VUFORIA_API Vuforia::setRotation ( int  rotation)

Set the current screen orientation.

iOS: Call to set any rotation on the Vuforia rendered video background and augmentation projection matrices to compensate for your application's auto-rotation behaviour.

The value specified is used internally by Vuforia to adapt rendering and tracking to the current screen orientation.

This method is used for integration of Vuforia with Unity on iOS.

See the sample apps for how to handle auto-rotation on non-Unity apps.

Parameters
rotationThe rotation of the screen (one of Vuforia::IOS_INIT_FLAGS).
void VUFORIA_API Vuforia::setInitParameters ( const char *  key)

Set Vuforia initialization parameters.

UWP: Call this function before calling Vuforia::init().

See the "Lifecycle of a Vuforia app" section on the main Vuforia reference page for more information. Lifecycle of a Vuforia app

Parameters
keyYour Vuforia license key.
void VUFORIA_API Vuforia::setCurrentOrientation ( Windows::Graphics::Display::DisplayOrientations  orientation)

Set the current screen orientation.

UWP: Call to set any rotation on the Vuforia rendered video background and augmentation projection matrices to compensate for your application's auto-rotation behaviour.

The value specified is used internally by Vuforia to adapt rendering and tracking to the current screen orientation.

This method should be called from the call-back registered with DisplayInformation->OrientationChanged.

Refer to the sample apps for full details.

Parameters
orientationThe orientation of the screen.
bool VUFORIA_API Vuforia::setHolographicAppCS ( void *  appSpecifiedCS)

Set the app coordinate system.

UWP (Holographic): Call to set the app coordinate system for Windows Holographic applications. Call after Vuforia::init() but before the camera is started.

Parameters
appSpecifiedCSA pointer to an ISpatialCoordinateSystem object representing your app's coordinate system.