C++ Java Unity
Unity Reference
VuforiaRenderer Class Reference

This class takes care about rendering the video background in the right size and orientation More...

Classes

struct  Vec2I
 This struct stores 2D integer vectors. More...
 
struct  VideoTextureInfo
 Describes the size of the texture in the graphics unit as well as the size of the image inside the texture. The latter corresponds to the size of the image delivered by the camera More...
 

Public Types

enum  FpsHint {
  NONE = 0,
  NO_VIDEOBACKGROUND = 1 << 0,
  POWEREFFICIENCY = 1 << 1,
  FAST = 1 << 2
}
 Application behavior aspects influencing the recommended render frame rate. Use as parameters to GetRecommendedFps. More...
 

Public Member Functions

void ClearVideoBackgroundConfig ()
 clears the config of the videobackground when Vuforia is stopped. [DEPRECATED] More...
 
int GetRecommendedFps (FpsHint flags)
 Query recommended rendering frame rate based on application hints. The target rendering frame rate of an AR or VR application is an important trade-off between optimal experience and device power usage. The choice is influenced by multiple parameters including device type, the active Trackers, the camera and/or sensor frame rates. Furthermore there are application specific trade offs to consider. These hints can be passed to the function as parameters (see FpsHint). For example, an application with animated content may need consistent 60 fps rendering even on a device that can only deliver poses at 30 fps. GetRecommendedFps considers the device parameters as well as the application specific hints and returns a recommended frame rate. The returned value can then be set via setTargetFps. Note that GetRecommendedFps may return different values tuned to the active CameraDevice.CameraDeviceMode and active Trackers. Thus it is recommended to call this API after the application has completed the camera and tracker setup as well as when an application transitions between modes (For example when transitioning between AR to VR modes) More...
 
VideoTextureInfo GetVideoTextureInfo ()
 Returns the texture info associated with the current video background More...
 
bool IsVideoBackgroundInfoAvailable ()
 Check if video background info is available More...
 
void Pause (bool pause)
 Turns pausing on or off. Pausing will freeze the camera video and all trackables will remain in their current state. Autorotation will be disabled during video background freezing. More...
 
void SetLegacyRenderingEnabledCondition (Func< bool > condition)
 

Properties

static VuforiaRenderer Instance [get]
 Returns an instance of a VuforiaRenderer (thread safe) More...
 
Texture VideoBackgroundTexture [get]
 The texture the video background is rendered into More...
 

Detailed Description

This class takes care about rendering the video background in the right size and orientation

Member Enumeration Documentation

enum FpsHint
strong

Application behavior aspects influencing the recommended render frame rate. Use as parameters to GetRecommendedFps.

Enumerator
NONE 

No FPS hint defined

NO_VIDEOBACKGROUND 

The application does not draw the video background (in optical see- through AR or VR mode). Do not set this flag when in video see- through AR mode.

POWEREFFICIENCY 

The application requests conservative power consumption to reduce heat accumulation and increase battery life. On some devices this may be at the cost of reduced application performance and decreased quality of experience.

FAST 

The application uses content that requires a high rendering rate, E.g. using smooth character animation.

Member Function Documentation

void ClearVideoBackgroundConfig ( )

clears the config of the videobackground when Vuforia is stopped. [DEPRECATED]

int GetRecommendedFps ( FpsHint  flags)

Query recommended rendering frame rate based on application hints. The target rendering frame rate of an AR or VR application is an important trade-off between optimal experience and device power usage. The choice is influenced by multiple parameters including device type, the active Trackers, the camera and/or sensor frame rates. Furthermore there are application specific trade offs to consider. These hints can be passed to the function as parameters (see FpsHint). For example, an application with animated content may need consistent 60 fps rendering even on a device that can only deliver poses at 30 fps. GetRecommendedFps considers the device parameters as well as the application specific hints and returns a recommended frame rate. The returned value can then be set via setTargetFps. Note that GetRecommendedFps may return different values tuned to the active CameraDevice.CameraDeviceMode and active Trackers. Thus it is recommended to call this API after the application has completed the camera and tracker setup as well as when an application transitions between modes (For example when transitioning between AR to VR modes)

Parameters
flagsBitfield of FpsHint flags
VideoTextureInfo GetVideoTextureInfo ( )

Returns the texture info associated with the current video background

bool IsVideoBackgroundInfoAvailable ( )

Check if video background info is available

void Pause ( bool  pause)

Turns pausing on or off. Pausing will freeze the camera video and all trackables will remain in their current state. Autorotation will be disabled during video background freezing.

void SetLegacyRenderingEnabledCondition ( Func< bool >  condition)

Property Documentation

VuforiaRenderer Instance
staticget

Returns an instance of a VuforiaRenderer (thread safe)

Texture VideoBackgroundTexture
get

The texture the video background is rendered into