This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.Plugins.AppVarjo Class

This set of functions is available when the AppVarjo plugin is loaded.

Notice
AppVarjo plugin cannot be used in a Qt-based application.

If AppVarjo plugin is loaded together with the engine, the HAS_APP_VARJO definition is set. This definition can be used, for example, to avoid errors if the plugin is not loaded; the code in which the plugin functions are executed can be wrapped around as follows:

Source code (UnigineScript)
#ifdef HAS_APP_VARJO
	// AppVarjo functions
#endif

AppVarjo Class

Enums

EYE_STATUS#

NameDescription
INVALID = 0Eye is not tracked and not visible (for example, eye is shut).
VISIBLE = 1Eye is visible but not reliably tracked (for example, saccade or blink).
COMPENSATED = 2Eye is tracked but quality compromised (for example, headset has moved after calibration).
TRACKED = 3Eye is tracked.

EYETRACKING_STATUS#

NameDescription
INVALID = 0Data is not available, user is not wearing the device or eyes cannot be found.
ADJUST = 1User is wearing the device, but gaze tracking is being calibrated.
VALID = 2Data is valid.

CONTROLLER_ROLE#

NameDescription
INVALID = 0Invalid value for controller type.
LEFT_HAND = 1Tracked device is associated with the left hand.
RIGHT_HAND = 2Tracked device is associated with the right hand.
OPT_OUT = 3Tracked device is opting out of left/right hand.
TREADMILL = 4Tracked device is a treadmill.
MAX = 5Indicates the maximum number of controller roles.

BUTTON#

NameDescription
SYSTEM = 0The system button. These events are not visible to applications and are used internally to bring up the Steam Overlay or the Steam Client.
APPLICATIONMENU = 1The application menu button.
GRIP = 2The grip button.
DPAD_LEFT = 3The sensor panel left button.
DPAD_UP = 4The sensor panel up button.
DPAD_RIGHT = 5The sensor panel right button.
DPAD_DOWN = 6The sensor panel down button.
A = 7The button reserved for manual controllers.
AXIS0 = 32The axis reserved for manual controllers.
AXIS1 = 33The axis reserved for manual controllers.
AXIS2 = 34The axis reserved for manual controllers.
AXIS3 = 35The axis reserved for manual controllers.
AXIS4 = 36The axis reserved for manual controllers.
STEAMVR_TOUCHPAD = 32The touchpad on the SteamVR controller. It is the same as BUTTON_AXIS0.
STEAMVR_TRIGGER = 33The trigger on the SteamVR controller. It is the same as BUTTON_AXIS1.
DASHBOARD_BACK = 2The back to dashboard button.
MAX = 64This is not an actual button. It just indicates the maximum number of buttons in the system.

AXIS#

NameDescription
NONE = 0No axis is identified on the controller.
TRACKPAD = 1An axis of a trackpad type.
JOYSTICK = 2An axis of a joystick type.
TRIGGER = 3An axis of a trigger type.

DEVICE#

NameDescription
INVALID = 0A tracked device with an invalid index.
HMD = 1A tracked head-mounted display.
CONTROLLER = 2A tracked controller.
GENERIC_TRACKER = 3A tracked tracker device.
TRACKING = 4A tracked camera and base stations that serve as tracking reference points.

VIEWPORT#

NameDescription
BLACK_SCREEN = 0No image (black screen).
MONO = 1Mono image.
STEREO = 2Stereo image (left and right eye).

Properties

bool VisualizerEnabled#

Value indicating if visualizer is enabled.
set
Toggles visualizer.
set value - true to enable visualizer; false to disable it.

long FrameNum#

Unique identifier of the frame when the data was recorded.

AppVarjo.EYE_STATUS RightEyeStatus#

Value representing the tracking status for the right eye.

AppVarjo.EYE_STATUS LeftEyeStatus#

Value representing the tracking status for the left eye.

AppVarjo.EYETRACKING_STATUS EyeTrackingStatus#

Value representing the status of eye tracking in the Varjo headsets.

double Stability#

Returns a value between 0.0 and 1.0 specifying the stability of the user’s focus. 0.0 means not stable and 1.0 means stable.

double FocusDistance#

The distance between the eye and the focus point.

long CaptureTime#

Timestamp of when the data was recorded, in nanoseconds.

double RightEyePupilSize#

The size of the right eye pupil, the value between 0 and 1.

double LeftEyePupilSize#

The size of the left eye pupil, the value between 0 and 1.

vec3 GazeWorldDirection#

Gaze direction vector, which is a combined value for both eyes, in world coordinates.

vec3 RightEyeWorldDirection#

Direction vector of the right eye.

vec3 RightEyeWorldPosition#

World position of the right eye.

vec3 LeftEyeWorldDirection#

Direction vector of the left eye.

vec3 LeftEyeWorldPosition#

World position of the left eye.

vec3 FocusWorldPosition#

World position of the eye focus point.

bool IsEyeTrackingValid#

Value indicating if eye tracking is valid.

AppVarjo.VIEWPORT ViewportMode#

A value indicating the current viewport mode, that determines the type of image to be displayed in the viewport.
set
Sets the viewport mode, that determines the type of image to be displayed in the viewport.
set value - Viewport mode. One of the VIEWPORT variables.

Members


void SetHeadPositionLock ( bool lock ) #

Locks the head position.

Arguments

  • bool lock - true to lock the head position.

void SetHeadRotationLock ( bool lock ) #

Locks the head rotation.

Arguments

  • bool lock - true to lock the head rotation.

bool IsHeadPositionLocked ( ) #

Returns the value indicating if the head position is locked.

Return value

true if the head position is locked; otherwise - false.

bool IsHeadRotationLocked ( ) #

Returns the value indicating if the head rotation is locked.

Return value

true if the head rotation is locked; otherwise - false.

int GetMaxTrackedDeviceCount ( ) #

Returns the maximum value of tracked devices.

Return value

The maximum value of tracked devices.

int GetControllerStateAxisCount ( ) #

Returns a number of axes.

Return value

Number of axes.

mat4 GetDevicePose ( int device_num ) #

Returns a single pose for a tracked device.

Arguments

  • int device_num - Device ID.

Return value

Identity matrix.

vec3 GetDeviceVelocity ( int device_num ) #

Returns a device velocity in tracker space, in meters per second.

Arguments

  • int device_num - Device ID.

Return value

Velocity.

vec3 GetDeviceAngularVelocity ( int device_num ) #

Returns a device angular velocity, in radians per second.

Arguments

  • int device_num - Device ID.

Return value

Angular velocity.

bool IsDeviceConnected ( int device_num ) #

Returns a value indicating if the device connected to the slot.

Arguments

  • int device_num - Device ID.

Return value

true - connected; false - not connected.

bool IsPoseValid ( int device_num ) #

Returns a value indicating if the device pose is valid.

Arguments

  • int device_num - Device ID.

Return value

true - valid; false - invalid.

int GetTrackingResult ( int device_num ) #

Returns the value indicating the tracking result:
  • Uninitialized
  • Calibrating in progress
  • Calibrating out of range
  • Running correctly
  • Running out of range

Arguments

  • int device_num - Device ID.

Return value

Tracking result.

AppVarjo.DEVICE GetDeviceType ( int device_num ) #

Returns the device type.

Arguments

  • int device_num - Device ID.

Return value

Device type, one of the DEVICE variables.

AppVarjo.AXIS GetDeviceAxisType ( int device_num, int axis_num ) #

Returns the value that identifies what type of axis is on the indicated controller.

Arguments

  • int device_num - Device ID.
  • int axis_num - Axis number.

Return value

Axis of a corresponding type. One of the AXIS variables.

int GetControllerPacketNum ( int device_num ) #

Returns the number of the controller packet.

Arguments

  • int device_num - Device ID.

Return value

Number of the controller packet.

bool GetControllerButtonPressed ( int device_num, AppVarjo.BUTTON button ) #

Returns the value indicating if the specified button is pressed.

Arguments

Return value

true if the button is pressed; otherwise - false.

bool GetControllerButtonTouched ( int device_num, AppVarjo.BUTTON button ) #

Returns the value indicating if the specified button is touched.

Arguments

Return value

true if the button is pressed; otherwise - false.

vec2 GetControllerAxis ( int device_num, int axis_num ) #

Returns the coordinates of the specified controller axis along the X and Y axes.

Arguments

  • int device_num - Device ID.
  • int axis_num - Axis number.

Return value

X and Y in the range of [-1;1] ([0;1] for a trigger).

void SetControllerVibration ( int device_num, ushort duration ) #

Sets the vibration of the given duration and amplitude.

Arguments

  • int device_num - Device ID.
  • ushort duration - Duration of the vibration.

void RequestCalibration ( ) #

Triggers the gaze calibration sequence, if gaze tracking has been enabled in Varjo settings and the Varjo system is in a state where it can bring up the calibration UI.

AppVarjo.CONTROLLER_ROLE GetControllerRole ( int device_num ) #

Returns a specific role associated with a tracked device.

Arguments

  • int device_num - Device ID.

Return value

Role associated with a tracked device. One of the CONTROLLER_ROLE variables.
Last update: 2021-04-29
Build: ()