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

Namespaces

 Driver
 
 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  AreaTarget
 A type of Trackable that represents a scanned physical environment. More...
 
class  AreaTargetResult
 Tracking data resulting from tracking an AreaTarget. More...
 
class  AreaTracker
 A type of Tracker that tracks scanned physical environments. 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  CloudRecoSearchResult
 A search result returned from a TargetFinder initialized as cloud-based image recognition search. 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...
 
struct  EyewearCalibrationReading
 Structure for an eyewear calibration reading to be used with EyewearUserCalibration. (DEPRECATED) 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. (DEPRECATED) More...
 
class  Frame
 A collection of different representations of a single image captured from a camera. More...
 
struct  FusionProviderPlatformInfo
 struct returned from getFusionProviderPlatformInfo() 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  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  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  RuntimeImageSource
 A handle for creating a new Trackable from an image file in a DataSet. More...
 
class  SessionRecorder
 
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
 Efficiently recognizes particular targets in the camera feed. 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  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  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...
 

Enumerations

enum  EYEID {
  EYEID_MONOCULAR =0,
  EYEID_LEFT,
  EYEID_RIGHT,
  EYEID_COUNT
}
 
enum  IOS_INIT_FLAGS {
  ROTATE_IOS_90 = 128,
  ROTATE_IOS_180 = 256,
  ROTATE_IOS_270 = 512,
  ROTATE_IOS_0 = 1024
}
 
enum  DISPLAY_ORIENTATION {
  NONE = 0,
  LANDSCAPE = 1,
  PORTRAIT = 2,
  LANDSCAPE_FLIPPED = 4,
  PORTRAIT_FLIPPED = 8
}
 Display orientation types. More...
 
enum  VIEW {
  VIEW_SINGULAR,
  VIEW_LEFTEYE,
  VIEW_RIGHTEYE,
  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,
  INIT_LICENSE_ERROR_BAD_REQUEST = -12
}
 Return codes for init() function. More...
 
enum  PIXEL_FORMAT {
  UNKNOWN_FORMAT = 0,
  RGB565 = 1,
  RGB888 = 2,
  GRAYSCALE = 4,
  RGBA8888 = 16,
  NV21 = 32,
  NV12 = 64,
  YV12 = 128,
  YUV420P = 256,
  YUYV = 512
}
 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,
  HINT_MODEL_TARGET_RECO_WHILE_EXTENDED_TRACKED = 4,
  HINT_STATIC_DEVICE_TRACKER = 5
}
 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
}
 The kinds of Fusion provider available for Vuforia to use. More...
 
enum  FUSION_PROVIDER_PLATFORM_TYPE {
  FUSION_PROVIDER_PLATFORM_NOT_AVAILABLE = 0,
  FUSION_PROVIDER_PLATFORM_ARKIT,
  FUSION_PROVIDER_PLATFORM_ARCORE
}
 The types of platform Fusion provider information available. More...
 

Functions

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...
 
bool VUFORIA_API setProviderConfiguration (const void *const config)
 Set Vuforia initialization parameters for Fusion provider available on iOS. 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 (DISPLAY_ORIENTATION orientation)
 Set the current screen orientation. More...
 
bool VUFORIA_API setHolographicAppCS (void *appSpecifiedCS)
 Set the app coordinate system. More...
 
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...
 
FusionProviderPlatformInfo VUFORIA_API getFusionProviderPlatformInfo ()
 Returns information about the underlying Platform AR currently in 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 ()
 
VUFORIA_API const char * getBuildVersion ()
 
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 (const char *key, const char *assetsDir=0)
 Set Vuforia initialization parameters. More...
 

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.

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

Display orientation types.

Enumerator
NONE 

No display orientation is specified.

LANDSCAPE 

Specifies that the display is oriented in landscape mode where the width of the display viewing area is greater than the height.

PORTRAIT 

Specifies that the display rotated 90 degrees in the clockwise direction to orient the display in portrait mode where the height of the display viewing area is greater than the width.

LANDSCAPE_FLIPPED 

Specifies that the display rotated another 90 degrees in the clockwise direction (to equal 180 degrees) to orient the display in landscape mode where the width of the display viewing area is greater than the height. This landscape mode is flipped 180 degrees from the Landscape mode.

PORTRAIT_FLIPPED 

Specifies that the display rotated another 90 degrees in the clockwise direction (to equal 270 degrees) to orient the display in portrait mode where the height of the display viewing area is greater than the width. This portrait mode is flipped 180 degrees from the Portrait mode.

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_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.

INIT_LICENSE_ERROR_BAD_REQUEST 

Unable to verify license key due to bad request.

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.

RGBA8888 

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

NV21 

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

NV12 

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

YV12 

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

YUV420P 

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

YUYV 

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

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 images 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.

Note
This hint can only be set after the ObjectTracker has been initialized.
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.

Note
This hint can only be set after the ObjectTracker has been initialized.
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.

Note
This hint can only be set after the ObjectTracker has been initialized.
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.

HINT_MODEL_TARGET_RECO_WHILE_EXTENDED_TRACKED 

Turn on recognition engine for an Advanced (360) Model Target dataset while extended tracking a model.

This hint enables the recognition engine when extended tracking an existing target. Valid values for the hint are 0 or 1. When set to 0, the recognition engine is stopped for Advanced (360) datasets after a model target has been found and is never turned on again automatically. The dataset needs to be deactivated and activated, or the tracker stopped and started, in order to turn on recognition again. When set to 1, recognition is turned on as soon as an existing target is only extended tracked. If the recognition engine finds a new target in the image frame, tracking will be switched to the newly identified target, resulting in tracking loss of the prior model target Default is: 1

Note
This hint can only be set after the ObjectTracker has been initialized.
HINT_STATIC_DEVICE_TRACKER 

Switch the device tracker to a static mode.

Configures the device tracker for statically mounted devices, e.g. a mobile device on a tripod looking at an object. In such a case, standard Vuforia fusion tracking will not succeed to initialize for lack of movement. This hint configures the device tracker to return static poses to stabilize tracking e.g. in case of the object being occluded. Valid values for the hint are 0 or 1 When set to 0, the device tracker is initialised normally. When set to 1, the device tracker is changed into the static mode. Default is: 0

Note
This hint can only be set before the DeviceTracker has been initialized

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.

The types of platform Fusion provider information available.

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

See getFusionProviderPlatformInfo() for more information

Enumerator
FUSION_PROVIDER_PLATFORM_NOT_AVAILABLE 

Unknown provider.

FUSION_PROVIDER_PLATFORM_ARKIT 

The provider is ARKit.

FUSION_PROVIDER_PLATFORM_ARCORE 

The provider is ARCore.

Function Documentation

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).
bool VUFORIA_API Vuforia::setProviderConfiguration ( const void *const  config)

Set Vuforia initialization parameters for Fusion provider available on iOS.

Experimental:

iOS: Call this function after Vuforia::init() and before getFusionProviders is called for the first time.

This function is used to configure the ARKit session that will be used. An instance of the class ARWorldTrackingConfiguration should be created and its parameters should be set as desired. The pointer to this instance should be passed in this function. Vuforia inspects the configuration values and takes a copy of the ones that are appropriate to use with Vuforia.

Important to notice that the setting has no effect until getFusionProviderPlatformInfo is called.

Note
Be aware: Currently Vuforia makes use of only the AREnvironmentTexturing option, all other values are used based on Vuforia's usage of ARKit. The current configuration can be found using the function getFusionProviderPlatformInfo.
Parameters
configPointer to configuration to set.
Returns
bool result code: true for success, false for failure
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 setInitParameters ( const char *  key)

Set Vuforia initialization parameters.

Linux: 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.

Lumin: 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.

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 ( DISPLAY_ORIENTATION  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.
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 and AreaTarget will cease to work and ModelTargets will operate in a less robust manner.

If you restrict Fusion to FUSION_PROVIDER_VUFORIA_SENSOR_FUSION, AreaTarget will cease to work.

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.
FusionProviderPlatformInfo VUFORIA_API Vuforia::getFusionProviderPlatformInfo ( )

Returns information about the underlying Platform AR currently in use.

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

The information contained in the returned struct can be used to allow applications to interact with the underlying Platform Fusion provider such as ARKit or ARCore to gain access to functionality not currently available through the Vuforia APIs. For example additional lighting information or plane boundaries. The values contained within the struct are platform specific and need to be used with platform specific code.

This API call should be made after Vuforia::init(). For instance to use this functionality it can be called in an applications render loop to combine functionality supplied by the underlying Fusion Provider with Vuforia functionality, when the platform specific functionality is not available using Vuforia APIs. see FusionProviderPlatformInfo for more details.

Note
that some parameters of the returned structure have also a platform specific lifecycle, please see FusionProviderPlatformInfo.
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.
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. The format is three numeric components, separated by dot. The components are major version, minor version and change version. The memory returned by this function is static and does not need to be freed.

VUFORIA_API const char* Vuforia::getBuildVersion ( )

Get the build ID of the Vuforia SDK as a C-style string. The format is a numeric string representation of the build ID. The memory returned by this function is static and does not need to be freed.

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 functionality 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 ( const char *  key,
const char *  assetsDir = 0 
)

Set Vuforia initialization parameters.

Windows: 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.
assetsDirDirectory where assets are located.