Changes in Vuforia 6

Vuforia 6.0 introduces the following important features and changes in the SDK:

  • VuMark support
  • Universal Windows Platform (UWP) support
  • Advanced Camera Usage API on Android
In addition, a few pieces of the public API have now been marked as deprecated and some old deprecated items have been fully removed from the SDK.
 

VuMark Support

Summary

Vuforia 6.0 brings in the VuMark feature which is a more powerful incarnation of the FrameMarker feature, with support for different shapes and more embedded information.

Vuforia Layer Changes

To facilitate the VuMark feature, at a Vuforia API level we added a new target and target result class, integrating them into the ObjectTracker.  There is also a VuMarkTemplate class which itself is a target and acts as the parent for run-time VuMarkTarget instances.

ObjectTracker

There are no visible API changes to the ObjectTracker.  Internally it is now able to load our VuMark template types from a dataset.

VuMarkTemplate

The VuMarkTemplate is the target that is loaded from the dataset and acts as the parent of all of the specific instances of VuMarkTargets, where a VuMarkTarget is defined by its code.

The template contains both the origin of the VuMark, as well as potentially user SVG data data packaged in the dataset.
/*===============================================================================
Copyright (c) 2016 PTC Inc. All Rights Reserved.
 
Vuforia is a trademark of PTC Inc., registered in the United States and other 
countries.
 
@file 
    VuMarkTemplate.h
 
@brief
    Header file for VuMarkTemplate class.
===============================================================================*/
#ifndef _VUFORIA_VUMARKTEMPLATE_H_
#define _VUFORIA_VUMARKTEMPLATE_H_
 
// Include files
#include <Vuforia/Trackable.h>
#include <Vuforia/ObjectTarget.h>
#include <Vuforia/Vectors.h>
 
namespace Vuforia
{
 
/// A VuMark template representing a set of 3D trackable VuMarkTargets objects.
/**
 * A VuMarkTarget represents the actual VuMark instance, instantiated based
 * on the VuMark template.
 */
class VUFORIA_API VuMarkTemplate : public ObjectTarget
{
public:
 
    /// Returns the Trackable class' type
    static Type getClassType();
 
    /// Gets the user data associated with this VuMarkTemplate provided in the 
    /// dataset. This data is always in text form. If no data is associated
    /// with the VuMarkTemplate, a null pointer is returned.
    virtual const char* getVuMarkUserData() const = 0;
 
    /// Returns the scaled origin of the VuMarkTemplate
    virtual Vuforia::Vec2F getOrigin() const = 0;
};
 
} // namespace Vuforia
 
#endif //_VUFORIA_VUMARKTEMPLATE_H_

VuMarkTarget

A VuMarkTarget is created when a new instance of a VuMark is detected.  Each result refers back to its VuMarkTarget and the VuMarkTarget refers back to the VuMarkTemplate in the dataset.  The VuMarkTarget is where the InstanceId can be retrieved as well as the generated image of the VuMark including its printed code.
/*===============================================================================
Copyright (c) 2016 PTC Inc. All Rights Reserved.
 
Vuforia is a trademark of PTC Inc., registered in the United States and other 
countries.
 
@file 
    VuMarkTarget.h
 
@brief
    Header file for VuMarkTarget class.
===============================================================================*/
#ifndef _VUFORIA_VUMARKTARGET_H_
#define _VUFORIA_VUMARKTARGET_H_
 
// Include files
#include <Vuforia/Trackable.h>
#include <Vuforia/ObjectTarget.h>
#include <Vuforia/VuMarkTemplate.h>
#include <Vuforia/InstanceId.h>
#include <Vuforia/Image.h>
 
namespace Vuforia
{
 
/// A target for tracking VuMark instances.
/**
 * A VuMarkTarget is an instance of a VuMarkTemplate with a specific instance ID,
 * which can be tracked. The actual visual appearance of the instance can also
 * be retrieved.
 *
 * Note that some ObjectTarget functionalities such as setting the target size or
 * starting / stopping extended tracking cannot be used with individual 
 * VuMarkTargets. You need to access these functionalities via the respective
 * VuMarkTemplate to change these properties for the entire set. 
 */
class VUFORIA_API VuMarkTarget : public ObjectTarget
{
public:
 
    /// Returns the Trackable class' type
    static Type getClassType();
 
    /// Returns the VuMark template this VuMark instance was instantiated from
    virtual const VuMarkTemplate& getTemplate() const = 0;
 
    /// Returns the instance ID of this particular VuMark instance
    virtual const InstanceId& getInstanceId() const = 0;
 
    /// Returns a generated image of the VuMark being tracked
    virtual const Image& getInstanceImage() const = 0;
};
 
} // namespace Vuforia
 
#endif //_VUFORIA_VUMARKTARGET_H_


VuMarkTargetResult


The VuMarkTargetResult encapsulates a particular detected/tracker VuMark.  Since VuMarks are the first feature to allow tracking multiple of the same item at once, it is also necessary to differentiate from the results that you are tracking.  We therefore have included a ResultID for the VuMarkTargetResult, which stays consistent for a particular tracked result at least until tracking is lost.

The use case is that if you have two instances with the exact same code being tracked, you may be playing an animation on each one, which can be out of sync.  Since the order of results in the Vuforia State are not guaranteed to stay the same across frames, we need to provide a ResultID so that the animations don’t pop back and forth between the two identical instances.
 
/*===============================================================================
Copyright (c) 2016 PTC Inc. All Rights Reserved.
 
Vuforia is a trademark of PTC Inc., registered in the United States and other
countries.
 
@file 
    VuMarkTargetResult.h
 
@brief
    Header file for VuMarkTargetResult class.
===============================================================================*/
#ifndef _VUFORIA_VUMARKTARGETRESULT_H_
#define _VUFORIA_VUMARKTARGETRESULT_H_
 
// Include files
#include <Vuforia/ObjectTargetResult.h>
#include <Vuforia/VuMarkTarget.h>
 
namespace Vuforia
{
 
/// Result for a VuMarkTarget. 
/**
 *  The same VuMarkTarget can have multiple physical instances on screen
 *  simultaneously. In this case each appearance has its own VuMarkTargetResult,
 *  pointing to the same VuMarkTarget with the same instance ID.
 */
class VUFORIA_API VuMarkTargetResult : public ObjectTargetResult
{
public:
 
    /// Returns the TrackableResult class' type
    static Type getClassType();
 
    /// Returns the corresponding Trackable that this result represents
    virtual const VuMarkTarget& getTrackable() const = 0;
 
    /// Returns a unique id for a particular VuMark result, which is consistent
    /// frame-to-frame, while being tracked.  Note that this id is separate 
    /// from the trackable id.
    virtual int getId() const = 0;
};
 
} // namespace Vuforia
 
#endif //_VUFORIA_VUMARKTARGETRESULT_H_


InstanceId

The InstanceId is retrieved from the VuMarkTarget and provides methods for querying the ID that was read from the VuMark.  An InstanceId can be either a byte buffer, an ASCII string, or a number.
/*===============================================================================
Copyright (c) 2016 PTC Inc. All Rights Reserved.
 
Vuforia is a trademark of PTC Inc., registered in the United States and other
countries.
 
@file
    InstanceId.h
 
@brief
    Header file for InstanceId class.
===============================================================================*/
 
#ifndef _VUFORIA_INSTANCEID_H_
#define _VUFORIA_INSTANCEID_H_
 
// Include files
#include <Vuforia/System.h>
#include <Vuforia/Type.h>
 
namespace Vuforia
{
 
/// The ID of a particular VuMark instance.
class VUFORIA_API InstanceId
{
public:
 
    /// The type of data encoded in this ID.
    enum ID_DATA_TYPE
    {
        /// Generic byte data, stored in little-endian order in the buffer.
        /// For example, and ID of 0x123456 would appear as { 0x56, 0x34, 0x12 }
        BYTES = 0,
 
        /// Printable string data in ASCII.
        STRING = 1,
 
        /// Numeric data, not larger than a 64 bit unsigned long long.
        NUMERIC = 2
    };
 
    /// Get a char buffer filled with getLength() number of bytes containing
    /// the InstanceId.
    virtual const char* getBuffer() const = 0;
 
    /// Returns the length of the data.
    /* 
     *  If the instance ID data type is
     *   - BYTES: the number of bytes in the ID.
     *   - STRING: the maximum number of characters that could be returned, not 
     *             counting the ending null.  If copying the string data into 
     *             your own buffer, allocate this length + 1. 
     *   - NUMERIC: the number of bytes needed to store the ID's numeric value 
     *              (e.g. 8 bytes for 64 bits).
     */
    virtual size_t getLength() const = 0;
 
    /// Returns the ID as unsigned long long if ID type is NUMBER,
    /// otherwise returns 0.
    virtual unsigned long long getNumericValue() const = 0;
 
    /// Gets the type of data this instance ID stores.
    virtual ID_DATA_TYPE getDataType() const = 0;
};
 
} // namespace Vuforia
 
#endif //_VUFORIA_INSTANCEID_H_

Vuforia Sample Pseudocode

// In initialization step
Vuforia::TrackerManager& trackerManager = Vuforia::TrackerManager::getInstance();
Vuforia::Tracker* trackerBase = 
        trackerManager.getTracker(Vuforia::ObjectTracker::getClassType());
objectTracker = static_cast<Vuforia::ObjectTracker*>(trackerBase);
 
if(objectTracker)
{
    Vuforia::DataSet* dataSetVuMark = objectTracker->createDataSet();
 
    if (QCAR::DataSet::exists("TW-VuMark.xml", Vuforia::STORAGE_APPRESOURCE)) {
        LOG_INFO("Found ThingCode dataset");
        dataSetVuMark->load("TW-VuMark.xml", Vuforia::STORAGE_APPRESOURCE);
        objectTracker->activateDataSet(dataSetVuMark);
    }
    else {
        LOG_ERROR("Failed to VuMark dataset!");
    }
}
 
// ...
 
// In the render loop.
Vuforia::Renderer& renderer = Vuforia::Renderer::getInstance();
const Vuforia::State& state = renderer.begin();
 
if(mCameraStarted)
    renderer.drawVideoBackground();
 
    
for (int r = 0; r < state.getNumTrackableResults(); ++r)
{
    const Vuforia::TrackableResult* trackableResult = state.getTrackableResult(r);
    if (trackableResult->isOfType(Vuforia::VuMarkTargetResult::getClassType()))
    {
        // Draw augmentation using result pose and VuMarkID.
    }
}

Universal Windows Platform (UWP) support

Summary

The Vuforia SDK now supports the Universal Windows Platform, with all Vuforia features available to use.  The Vuforia library is a DLL that provides a C++ API that is in most respects identical to those for Android and iOS versions of Vuforia.  A few lifecycle operations are specific to UWP, and these are defined in the header Vuforia_UWP.h.

Note that calling Vuforia.dll directly from applications written in other languages, such as C#, is not supported in this release.
We provide versions of the Vuforia.dll for x86 and x64.  There is no support at present for ARM or Windows Phone.

Vuforia License Key

UWP is a premium feature, and to use it you must obtain the correct type of app license key.  If you attempt to use an incompatible key, Vuforia::init() will return the error code Vuforia::INIT_LICENSE_ERROR_PRODUCT_TYPE_MISMATCH. Please refer to the Vuforia developer portal for licensing details.

Vuforia_UWP.h

This header file contains a small number of UWP-specific APIs, as shown below.
#include
<Vuforia/System.h>
 
namespace Vuforia
{
 
/// Initializes Vuforia
/**
<b>UWP:</b> Called to initialize Vuforia.  Initialization is progressive, so this function
should be called repeatedly until it returns 100 or a negative value.
Returns an integer representing the percentage complete (negative on error).
*/
int VUFORIA_API init();
 
/// Sets Vuforia initialization parameters
/**
<b>UWP:</b> Called to set the Vuforia initialization parameters prior to calling Vuforia::init().
*/
void VUFORIA_API setInitParameters(const char* key);
 
 
/// Sets the current rotation to be applied to the projection and background
/**
<b>UWP:</b> Called to set any rotation on the Vuforia rendered video background and
projection matrix applied to an augmentation after an auto rotation.
This method should be called from the call-back registered with DisplayInformation->OrientationChanged.
*/
void VUFORIA_API setCurrentOrientation(Windows::Graphics::Display::DisplayOrientations orientation);
 
 
} // namespace Vuforia
The usage of these functions, and recommended practices for calling the other Vuforia API functions, can be seen by studying the provided sample applications.  Take particular note that many of Microsoft’s UWP APIs are asynchronous and some need to called in particular thread contexts to work properly.

App sandboxing

Universal Windows applications are strictly sandboxed.  In particular, they do not have access to arbitrary parts of the filesystem.  For Vuforia the main impact of this is where datasets may be loaded from. 

The supported locations are as follows:
Vuforia::STORAGE_TYPEFolder location and notes
STORAGE_APPRESOURCEC:\Program Files\WindowsApps\<pkg>\
 
Resource files which are provisioned as part of the app download.  This is the place to put dataset files that are known at the time the app is built.  Read-only.
 
STORAGE_APPC:\Users\<user>\AppData\Local\Packages\<pkg>\LocalState\
 
Apps can use this location to store datasets that are not known at build-time, such as ones which are downloaded on the fly when the app runs.  Note that Vuforia stores some persistent state data in a subfolder of this location.  Read-write.
STORAGE_ABSOLUTEAbsolute paths may be used, but at present they must point to one of the above locations.  In particular, the user’s Documents folder cannot be used, even if the application has the necessary permission flag.  If your app needs to add datasets on the fly it is recommended that you copy them to the STORAGE_APP location.

Rendering

Vuforia for UWP supports rendering the camera video background using DirectX 11.  Depending on how you structure your application you can either ask Vuforia to draw the video background directly, or have it populate a DirectX texture that is managed by your application and which you can then render yourself or composite with the rest of your scene and augmentations.

Using drawVideoBackground

The VuMark sample demonstrates how to use drawVideoBackground().  See VuMarkRenderer::RenderScene() for details.

Using updateVideoBackgroundTexture

The ImageTargets sample demonstrates how to use updateVideoBackgroundTexture to render the camera feed in conjunction with the RenderingPrimitives class.  See VideoBackground::Render() in the sample for details.  The following is an excerpt from this function which illustrates how the texture is handed off to the Vuforia library using Vuforia::Renderer::setVideoBackground.
On first run, a suitable ID3D11Texture2D is created to contain the video frames.  The sample app uses a helper class (VideoBackgroundTexture) to assist with this:
void VideoBackground::Render(
        Vuforia::Renderer &renderer,
        Vuforia::RenderingPrimitives *renderPrimitives,
        Vuforia::VIEW viewId)
{
    auto context = m_deviceResources->GetD3DDeviceContext();
    auto device = m_deviceResources->GetD3DDevice();
 
    if (m_vbTexture == nullptr) {
        m_vbTexture = std::shared_ptr<VideoBackgroundTexture>(
            new VideoBackgroundTexture(m_deviceResources));
    }
 
    if (!m_vbTexture->IsInitialized())
    {
        // Init the video background texture
        Vuforia::Vec2I texSize = renderPrimitives->getVideoBackgroundTextureSize();
        m_vbTexture->Init(texSize.data[0], texSize.data[1]);
        // The ID3D11Texture2D pointer is then wrapped in Vuforia::DXTextureData
        // and passed into Vuforia::Renderer::setVideoBackgroundTexture.
        // The renderer keeps hold of this texture for subsequent updates.

        // Hand over a texture to Vuforia, it will then render into this texture each
        // time updateVideoBackgroundTexture is called.
        ID3D11Texture2D* vbD3DTexture = m_vbTexture->GetD3DTexture().Get();
        Vuforia::Renderer::getInstance().setVideoBackgroundTexture(
                                  Vuforia::DXTextureData(vbD3DTexture));
 
        // Initialize the video background mesh
        const Vuforia::Mesh &vbMesh = renderPrimitives->getVideoBackgroundMesh(viewId);
        InitMesh(vbMesh, device);
    }
On each frame, the updateVideoBackgroundTexture method is called to update the stored texture with the correct camera image data for the Vuforia state which is being rendered:
 
// Update the camera video-background texture
    if (!renderer.updateVideoBackgroundTexture(nullptr))
    {
        SampleUtil::Log(L"ImageTargetsRenderer", L"Unable to update video background texture");
        return;
    }

Advanced Camera Usage API on Android

The CameraFields class has been added the the public Vuforia API with corresponding setters and getters in CameraDevice.  This allows for advanced use cases such as tweaking ISO, exposure compensation, etc.
Currently this feature will only work on Android.
/*===============================================================================
Copyright (c) 2015-2016 PTC Inc. All Rights Reserved.
 
Copyright (c) 2010-2014 Qualcomm Connected Experiences, Inc. All Rights Reserved.
 
Vuforia is a trademark of PTC Inc., registered in the United States and other 
countries.
 
@file 
    CameraDevice.h
 
@brief
    Header file for CameraDevice class.
===============================================================================*/
#ifndef _VUFORIA_CAMERADEVICE_H_
#define _VUFORIA_CAMERADEVICE_H_
 
// Include files
#include <Vuforia/System.h>
#include <Vuforia/NonCopyable.h>
#include <Vuforia/VideoMode.h>
#include <Vuforia/CameraCalibration.h>
#include <Vuforia/CameraField.h>
 
 
namespace Vuforia
{
 
/// Implements access to the phone's built-in camera
class VUFORIA_API CameraDevice : private NonCopyable
{
public:
    enum MODE
    {
        MODE_DEFAULT = -1,                ///< Default camera mode
        MODE_OPTIMIZE_SPEED = -2,         ///< Fast camera mode
        MODE_OPTIMIZE_QUALITY = -3,       ///< High-quality camera mode
    };
 
    enum FOCUS_MODE 
    {
        FOCUS_MODE_NORMAL,           ///< Default focus mode
        FOCUS_MODE_TRIGGERAUTO,      ///< Triggers a single autofocus operation
        FOCUS_MODE_CONTINUOUSAUTO,   ///< Continuous autofocus mode
        FOCUS_MODE_INFINITY,         ///< Focus set to infinity
        FOCUS_MODE_MACRO             ///< Macro mode for close-up focus
    };
 
    enum CAMERA_DIRECTION
    { 
        CAMERA_DIRECTION_DEFAULT,   /// Default camera direction (device-specific, usually maps to back camera)
        CAMERA_DIRECTION_BACK,      /// The camera is facing in the opposite direction as the screen
        CAMERA_DIRECTION_FRONT,     /// The camera is facing in the same direction as the screen
    };
 
    /// Returns the CameraDevice singleton instance.
    static CameraDevice& getInstance();
 
    /// Initializes the camera.
    virtual bool init(CAMERA_DIRECTION camera = CAMERA_DIRECTION_DEFAULT) = 0;
 
    /// Deinitializes the camera.
    /**
     *  Any resources created or used so far are released. Note that this
     *  function should not be called during the execution of the
     *  UpdateCallback and if so will return false.
     */
    virtual bool deinit() = 0;
 
    /// Starts the camera. Frames are being delivered.
    /**
     *  Depending on the type of the camera it may be necessary to perform
     *  configuration tasks before it can be started.
     */
    virtual bool start() = 0;
 
    /// Stops the camera if video feed is not required (e.g. in non-AR mode
    /// of an application).
    virtual bool stop()  = 0;
 
    /// Returns the number of available video modes.
    /**
     *  This is device specific and can differ between mobile devices or operating
     *  system versions.
     */
    virtual int getNumVideoModes() const = 0;
 
    /// Returns the video mode currently selected.
    /**
     *  If no video mode is set then Vuforia chooses a video mode.
     */
    virtual VideoMode getVideoMode(int nIndex) const = 0;
 
    /// Returns the camera direction.
    virtual CAMERA_DIRECTION getCameraDirection() const = 0;
 
    /// Chooses a video mode out of the list of modes
    /*
     *  This function can be only called after the camera device has been
     *  initialized but not started yet. Once you have started the camera and
     *  you need the select another video mode, you need to stop(), deinit(),
     *  then init() the camera before calling selectVideoMode() again.
     */
    virtual bool selectVideoMode(int index) = 0;
 
    /// Provides read-only access to camera calibration data.
    virtual const CameraCalibration& getCameraCalibration() const = 0;
 
    /// Enable/disable torch mode if the device supports it.
    /**
     *  Returns true if the requested operation was successful, False
     *  otherwise.
     */
    virtual bool setFlashTorchMode(bool on) = 0;
 
    /// Set the requested focus mode if the device supports it.
    /**
     *  The allowed values are FOCUS_MODE_NORMAL, FOCUS_MODE_TRIGGERAUTO,
     *  FOCUS_MODE_CONTINUOUSAUTO, FOCUS_MODE_INFINITY, FOCUS_MODE_MACRO,
     *  though not all modes are supported on all devices. Returns true if
     *  the requested operation was successful, False otherwise.
     *  Also note that triggering a single autofocus event using 
     *  FOCUS_MODE_TRIGGERAUTO may stop continuous autofocus if that focus
     *  mode was set earlier.
     */
    virtual bool setFocusMode(int focusMode) = 0;
        
    
    /// Write accessors for camera fields
 
    // Setting to NULL removes the field
    virtual bool setField(const char* key, const char* value) = 0;
    virtual bool setField(const char* key, Vuforia::Int64 value) = 0;
    virtual bool setField(const char* key, float value) = 0; 
    virtual bool setField(const char* key, bool value) = 0; 
    virtual bool setField(const char* key, Vuforia::Int64 intRange[2]) = 0;
    
    /// Get the number of camera fields
    /**
     *  Note this may not be the complete set of camera fields available on this
     *  device and some keys may not be supported on every device
     */
    virtual int getNumFields() const = 0;
 
    /// Get the CameraField and associated key for the given index
    virtual bool getCameraField(int index, CameraField& field) const = 0; 
 
    /// Read accessors for camera fields
    virtual bool getFieldString(const char* key, char* value, size_t maxlength) const = 0; 
    virtual bool getFieldInt64(const char* key, Vuforia::Int64& value) const = 0;
    virtual bool getFieldFloat(const char* key, float& value) const = 0; 
    virtual bool getFieldBool(const char* key, bool& value) const = 0;
    virtual bool getFieldInt64Range(const char* key, Vuforia::Int64* intRange) const = 0;
};
 
} // namespace Vuforia
 
#endif // _VUFORIA_CAMERADEVICE_H_

 
 
/*===============================================================================
 Copyright (c) 2016 PTC Inc. All Rights Reserved.
 
 Vuforia is a trademark of PTC Inc., registered in the United States and other
 countries.
 
 @file
    CameraField.h
 
 @brief
    Header file for CameraField class.
 ===============================================================================*/
#ifndef _VUFORIA_CAMERAFIELD_H_
#define _VUFORIA_CAMERAFIELD_H_
 
 
namespace Vuforia
{
 
/// Camera fields are advanced properties of the camera
/**
 *  Camera fields represent advanced camera properties and capture parameters such as
 *  exposure compensation, ISO and others. A field may be read only (e.g. maximum
 *  exposure compensation value) or read-write (e.g. exposure compensation value).
 *
 *  Camera fields are accessed as key-value pairs, where the value may be one of
 *  multiple basic types.
 *
 *  Camera fields are highly platform dependent and the keys to identify a given
 *  property and available values to set will vary across operating system,
 *  operating system version, camera API version and the device model itself.
 *  Furthermore the behavior of the camera driver wrt. these fields is highly
 *  fragmented. Thus CameraFields should only be used for specific use case and devices.
 *
 *  All of the Camera field APIs shall be called only after initializing the
 *  CameraDevice.
 *
 *  Camera Fields are currently only implemented for Android.
 *
 *  Finally, setting advanced camera parameters may adversely affect Vuforia
 *  tracking performance as well as cause functional issues.
 */
class CameraField
{
public:
    /// A camera field may be of the following types. On some platforms all
    /// fields are strings.
    enum DataType
    {
        TypeString,     ///< Null terminated array of characters (ASCII)
        TypeInt64,      ///< 64-bit signed integer
        TypeFloat,      ///< Single precision floating point
        TypeBool,       ///< Boolean
        TypeInt64Range, ///< Array of two 64-bit signed integer
        
        /// On some platforms the type may not be known at run-time. Setting
        /// or getting a parameter of unknown type will fail.
        TypeUnknown
    };
    
    /// Default constructor
    CameraField() : mType(TypeUnknown), mKey("") {};
    
    /// The data type of this field
    DataType mType;
    
    /// The key to identify this field.
    /// Note the string is only valid until the next call to getCameraField,
    /// take a copy of the string if you want to hold on to it.
    const char* mKey;
};
    
} // namespace Vuforia
#endif //_VUFORIA_CAMERAFIELD_H_

Changes to core APIs

  • Removed deprecated DataSet::STORAGE_TYPE and WordList::STORAGE_TYPE enums.Now only the Vuforia::STORAGE_TYPE enum is used.
  • Removal of deprecated (and unsupported) GL ES 1.1 enum
  • FrameMarker feature marked as deprecated
  • EyewearCalibrationProfileManager changed return type of getMaxCount and getUserCount methods
- virtual int getMaxCount() const = 0;
    - virtual int getUsedCount() const = 0;
 
    + virtual size_t getMaxCount() const = 0;
    + virtual size_t getUsedCount() const = 0;
  • EyewearUserCalibrator getDrawingAspectRatio function signature changed, now takes size_t parameters instead of ints
  • virtual float getDrawingAspectRatio(int surfaceWidth, int surfaceHeight) const = 0;
+ virtual float getDrawingAspectRatio(size_t surfaceWidth, size_t surfaceHeight) const = 0;
  • Renderer::drawVideoBackground marked as deprecated.RenderingPrimitives method is the preferred method for drawing the video background.
  • Removal of Scanline UI in SDK, moved to application logic.
In TargetFinder.h:
-    /// Sets the base color of the scanline in the scanning UI
-    /**
-     * The parameters allow you to set the Red, Green and Blue colors
-     * for the Scanline. They should be normalized values between 0 and 1.
-     */
-    virtual void setUIScanlineColor(float r, float g, float b) = 0;
-
-    /// Sets the base color of the points in the scanning UI
-    /**
-     * The parameters allow you to set the Red, Green and Blue colors
-     * for the Points. They should be normalized values between 0 and 1.
-     * Note that this call triggers the keypoint texture to be recreated and
-     * it should thus be avoided to called this every frame.
-     */
-    virtual void setUIPointColor(float r, float g, float b) = 0;
  • In RenderingPrimitives, getEffectiveFov, getViewportCentreToEyeAxis, getVideoBackgroundTextureSize APIs added and extra parameter added for getVideoBackgroundProjectionMatrix and getProjectionMatrix:
/*===============================================================================
Copyright (c) 2015-2016 PTC Inc. All Rights Reserved.
 
 
Copyright (c) 2015 Qualcomm Connected Experiences, Inc. All Rights Reserved.
 
Vuforia is a trademark of PTC Inc., registered in the United States and other
countries.
 
@file
RenderingPrimitives.h
 
@brief
Header file for RenderingPrimitives class.
===============================================================================*/
#ifndef _VUFORIA_RENDERING_PRIMITIVES_H_
#define _VUFORIA_RENDERING_PRIMITIVES_H_
 
#include <Vuforia/View.h>
#include <Vuforia/ViewList.h>
#include <Vuforia/Mesh.h>
#include <Vuforia/Matrices.h>
#include <Vuforia/Vectors.h>
#include <Vuforia/ViewerParameters.h>
 
namespace Vuforia
{
 
/// RenderingPrimitives class
/**
 * This class provides rendering primitives to be used when building
 * virtual reality experiences with an external VR viewer.
 *
 * The transformation measurement unit used is the same as the one used
 * to define the target size (usually meters).
 */
class VUFORIA_API RenderingPrimitives
{
public:
    virtual ~RenderingPrimitives();
 
    /// Copy constructor
    RenderingPrimitives(const RenderingPrimitives& other);
 
    /// Returns the set of views available for rendering from these primitives
    virtual ViewList& getRenderingViews() const;
 
    /// Returns a viewport for the given display in the format (x,y, width, height)
    virtual Vec4I getViewport(VIEW viewID) const;
 
    /// Returns a viewport for the given display in the format (x, y, width, height) normalized between 0 and 1
    virtual Vec4F getNormalizedViewport(VIEW viewID) const;
 
    /// Returns the projection matrix to use for the given view and the specified coordinate system
    virtual Matrix34F getProjectionMatrix(
        VIEW viewID, COORDINATE_SYSTEM_TYPE csType, bool adjustForViewportCentreToEyeAxis = true) const;
 
    /// Returns the Field-of-View of the viewports managed by this RenderingPrimitives object
    /* The effective FOV is computed based on screen size and viewer maximum FOV,
     * so will vary according to the host device and viewer.
     * This is only meaningful for the LEFT and RIGHT views, and only when used with a ViewerProfile
     * The components of the returned vector representFOV half-angles measured from the eye axis in the order:
     * {left, right, bottom, top}
     * These values are measured in radians
     */
    virtual const Vec4F getEffectiveFov(VIEW viewID) const;
    
    /// Returns the skew adjustments for a viewer that need to be applied to the projection matrix
    /// for a given co-ordinate system
    /*
     * Returns the offset of the eye axis relative to the centre of the viewport
     * This is normalised to the extents of the viewport, ie -1 to +1
     *
     * The values returned are used to modify the left/right eye projection matrices to ensure
     * the eye axis is in the centre of the viewport. For the videoBackgroundProjectionMatrix these 
     * values replace elements 3 and 7. For the camera projection matrices you replace
     * elements 2 and 6 of the matrix with these values.
     */
    virtual const Vec2F getViewportCentreToEyeAxis(VIEW viewID, COORDINATE_SYSTEM_TYPE csType) const;
 
    /// Returns an adjustment matrix needed to correct for the different position of display relative to the eye
    /**
     * The returned matrix is to be applied to the tracker pose matrix during rendering.
     * The adjustment matrix is in meters, if your scene is defined in another unit 
     * you will need to adjust the matrix before use.
     */
    virtual Matrix34F getEyeDisplayAdjustmentMatrix(VIEW viewID) const;
 
    /// Returns the video background texture size that has been used to calculate the mesh
    virtual const Vec2I getVideoBackgroundTextureSize() const;
 
    /// Returns the projection matrix to use when projecting the video background
    virtual Matrix34F getVideoBackgroundProjectionMatrix(
        VIEW viewID, COORDINATE_SYSTEM_TYPE csType, bool adjustForViewportCentreToEyeAxis = true) const;
 
    /// Returns a simple mesh suitable for rendering a video background texture
    virtual const Mesh& getVideoBackgroundMesh(VIEW viewID) const;
 
    /// Returns the recommended size to use when creating a texture to apply to the distortion mesh
    virtual const Vec2I getDistortionTextureSize(VIEW viewID) const;
 
    /// Returns a viewport for the given input to the distortion mesh in the format (x,y, width, height)
    virtual Vec4I getDistortionTextureViewport(VIEW viewID) const;
 
    /// Returns a barrel distortion mesh for the given view
    virtual const Mesh& getDistortionTextureMesh(VIEW viewID) const;
protected:
    RenderingPrimitives();
    class Impl;
    Impl* mImpl;
};
 
 
} // namespace Vuforia
 
#endif // _VUFORIA_RENDERING_PRIMITIVES_H_