This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Animations-Related Classes
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
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

engine.varjo Functions

Warning
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScript (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
Warning
VR functionality is available out of the box since 2.18 for all supported graphics APIs except OpenGL.

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

If Varjo plugin is loaded together with the engine, the HAS_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_VARJO
	// Varjo functions
#endif

Varjo Class

Members


void engine.varjo.setViewportMode ( int mode ) #

Sets the viewport mode, that determines the type of image to be displayed in the viewport.

Arguments

int engine.varjo.getViewportMode ( ) #

Returns a value indicating the current viewport mode, that determines the type of image to be displayed in the viewport.

Return value

Current viewport mode. One of the VARJO_VIEWPORT_ variables.

void engine.varjo.setHeadPositionLock ( int lock ) #

Locks the head position.

Arguments

  • int lock - 1 to lock the head position.

int engine.varjo.isHeadPositionLock ( ) #

Returns the value indicating if the head position is locked.

Return value

1 if the head position is locked; otherwise - 0.

void engine.varjo.setHeadRotationLock ( int lock ) #

Locks the head rotation.

Arguments

  • int lock - 1 to lock the head rotation.

int engine.varjo.isHeadRotationLock ( ) #

Returns the value indicating if the head rotation is locked.

Return value

1 if the head rotation is locked; otherwise - 0.

int engine.varjo.getMaxTrackedDeviceCount ( ) #

Returns the maximum value of tracked devices.

Return value

The maximum value of tracked devices.

int engine.varjo.getControllerStateAxisCount ( ) #

Returns a number of axes.

Return value

Number of axes.

mat4 engine.varjo.getDevicePose ( int device_num ) #

Returns a single pose for a tracked device.

Arguments

  • int device_num - Device ID.

Return value

Identity matrix.

vec3 engine.varjo.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 engine.varjo.getDeviceAngularVelocity ( int device_num ) #

Returns a device angular velocity, in radians per second.

Arguments

  • int device_num - Device ID.

Return value

Angular velocity.

bool engine.varjo.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 engine.varjo.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 engine.varjo.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.

int engine.varjo.getDeviceType ( int device_num ) #

Returns the device type.

Arguments

  • int device_num - Device ID.

Return value

Device type, one of the VARJO_DEVICE_ variables.

int engine.varjo.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 VARJO_AXIS_ variables.

int engine.varjo.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 engine.varjo.getControllerButtonPressed ( int device_num, int button ) #

Returns the value indicating if the specified button is pressed.

Arguments

  • int device_num - Device ID.
  • int button - A button, one of the VARJO_BUTTON_ variables.

Return value

true if the button is pressed; otherwise - false.

bool engine.varjo.getControllerButtonTouched ( int device_num, int button ) #

Returns the value indicating if the specified button is touched.

Arguments

  • int device_num - Device ID.
  • int button - A button, one of the VARJO_BUTTON_ variables.

Return value

true if the button is pressed; otherwise - false.

vec2 engine.varjo.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 engine.varjo.setControllerVibration ( int device_num, int duration ) #

Sets the vibration of the given duration and amplitude.

Arguments

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

int engine.varjo.isEyeTrackingValid ( ) #

Returns the value indicating if eye tracking is valid.

Return value

1 if eye tracking is valid; otherwise - 0.

Vec3 engine.varjo.getFocusWorldPosition ( ) #

Returns the position of the eye focus point in world coordinates.

Return value

World position of the eye focus point.

void engine.varjo.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.

Vec3 engine.varjo.getLeftEyeWorldPosition ( ) #

Returns the position of the left eye in world coordinates.

Return value

World position of the left eye.

Vec3 engine.varjo.getLeftEyeWorldDirection ( ) #

Returns the direction vector of the left eye in world coordinates.

Return value

Direction vector of the left eye.

Vec3 engine.varjo.getRightEyeWorldPosition ( ) #

Returns the position of the right eye in world coordinates.

Return value

World position of the right eye.

Vec3 engine.varjo.getRightEyeWorldDirection ( ) #

Returns the direction vector of the right eye in world coordinates.

Return value

Direction vector of the right eye.

Vec3 engine.varjo.getGazeWorldDirection ( ) #

Returns the gaze direction vector, which is a combined value for both eyes, in world coordinates.

Return value

Direction vector for both eyes.

double engine.varjo.getLeftEyePupilSize ( ) #

Returns the size of the left eye pupil, the value between 0 and 1 calculated according to the pupil size range detected by the Varjo headset.

Return value

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

double engine.varjo.getRightEyePupilSize ( ) #

Returns the size of the right eye pupil, the value between 0 and 1 calculated according to the pupil size range detected by the Varjo headset.

Return value

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

long engine.varjo.getCaptureTime ( ) #

Returns the timestamp of when the data was recorded, in nanoseconds.

Return value

Timestamp of when the data was recorded, in nanoseconds.

double engine.varjo.getFocusDistance ( ) #

Returns the distance between the eye and the focus point. It is a value between 0 and 2 meters.

Return value

The distance between the eye and the focus point.

double engine.varjo.getStability ( ) #

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.

Return value

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.

int engine.varjo.getEyeTrackingStatus ( ) #

Returns a value representing the status of eye tracking in the Varjo headsets.

Return value

Value representing the status of eye tracking in the Varjo headsets, one of the VARJO_EYETRACKING_STATUS_ variables.

int engine.varjo.getLeftEyeStatus ( ) #

Returns a value representing the tracking status for the left eye.

Return value

Value representing the tracking status for the left eye, one of the VARJO_EYE_STATUS_ variables.

int engine.varjo.getRightEyeStatus ( ) #

Returns a value representing the tracking status for the right eye.

Return value

Value representing the tracking status for the right eye, one of the VARJO_EYE_STATUS_ variables.

long engine.varjo.getFrameNum ( ) #

Returns a unique identifier of the frame when the data was recorded.

Return value

Unique identifier of the frame when the data was recorded.

void engine.varjo.setVisualizerEnabled ( int enabled ) #

Toggles visualizer.

Arguments

  • int enabled - 1 to enable visualizer; 0 to disable it.

int engine.varjo.isVisualizerEnabled ( ) #

Returns the value indicating if visualizer is enabled.

Return value

1 if visualizer is enabled; otherwise - 0.

int engine.varjo.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 VARJO_CONTROLLER_ROLE_ variables.

String engine.varjo.getDeviceManufacturerName ( int device ) #

Returns the manufacturer name of the specified device.

Arguments

  • int device - Device ID.

Return value

Manufacturer name.

String engine.varjo.getDeviceModelNumber ( int device ) #

Returns the model number of the specified device.

Arguments

  • int device - Device ID.

Return value

Model number.

int engine.varjo.isMixedRealityAvailable ( ) #

Returns a value indicating if mixed reality mode is available. Mixed reality enables you to combine real-world view from front-facing cameras mounted on the headset with the VR image rendered.

Return value

Flag: 1 if mixed reality mode is available; otherwise - 0.

void engine.varjo.setFoveatedRenderingEnabled ( int enabled ) #

Sets a value indicating if foveated rendering is enabled. Foveated rendering makes use of the eye tracking functionality in Varjo headsets to improve performance by reducing the image quality in peripheral areas where the user is not looking. Foveation allows applications to render fewer pixels and achieve a better VR experience.

Arguments

  • int enabled - Set 1 to enable foveated rendering; or 0 - to disable it.

int engine.varjo.isFoveatedRenderingEnabled ( ) #

Returns a value indicating if foveated rendering is enabled. Foveated rendering makes use of the eye tracking functionality in Varjo headsets to improve performance by reducing the image quality in peripheral areas where the user is not looking. Foveation allows applications to render fewer pixels and achieve a better VR experience.

Return value

Flag: 1 if foveated rendering is enabled; otherwise - 0.

void engine.varjo.setAlphaBlend ( int blend ) #

Sets a value indicating if alpha blending is enabled. This option enables blending VR and AR images using the alpha channel.

Arguments

  • int blend - Set 1 to enable alpha blending; or 0 - to disable it.

int engine.varjo.isAlphaBlend ( ) #

Returns a value indicating if alpha blending is enabled. This option enables blending VR and AR images using the alpha channel.

Return value

Flag: 1 if alpha blending is enabled; otherwise - 0.

void engine.varjo.setAlphaInvert ( int invert ) #

Sets a value indicating if alpha channel is inverted before using it for blending VR and AR images.

Arguments

  • int invert - Set 1 to use inverted alpha channel inversion; or 0 - to use alpha channel as is.

int engine.varjo.isAlphaInvert ( ) #

Returns a value indicating if alpha channel is inverted before using it for blending VR and AR images.

Return value

Flag: 1 if alpha channel inversion is enabled; otherwise - 0.

void engine.varjo.setVideo ( int video ) #

Sets a value indicating if video signal from the real-world view from the front-facing HMD-mounted cameras is enabled. The real-world view is used for combining virtual and real-world elements to create an immersive experience in mixed reality.

Arguments

  • int video - Set 1 to enable the real-world view from the front-facing HMD-mounted cameras; or 0 - to disable it (VR-only mode).

int engine.varjo.isVideo ( ) #

Returns a value indicating if video signal from the real-world view from the front-facing HMD-mounted cameras is enabled. The real-world view is used for combining virtual and real-world elements to create an immersive experience in mixed reality.

Return value

Flag: 1 if real-world view from the front-facing HMD-mounted cameras is enabled; otherwise - 0 (VR-only mode).

void engine.varjo.setDepthTest ( int test ) #

Sets a value indicating if depth testing is enabled.

Arguments

  • int test - Set 1 to enable depth testing; or 0 - to disable it.

int engine.varjo.isDepthTest ( ) #

Returns a value indicating if depth testing is enabled.

Return value

Flag: 1 if depth testing is enabled; otherwise - 0.

void engine.varjo.setDepthTestRangeEnabled ( int enabled ) #

Sets a value indicating if depth testing range is enabled. Use DepthTestRange ( Depth Test Near Z, Depth Test Far Z) to control the range for which the depth test is evaluated.

Arguments

  • int enabled - Set 1 to enable depth testing range; or 0 - to disable it.

int engine.varjo.isDepthTestRangeEnabled ( ) #

Returns a value indicating if depth testing range is enabled. Use DepthTestRange ( Depth Test Near Z, Depth Test Far Z) to control the range for which the depth test is evaluated.

Return value

Flag: 1 if depth testing range is enabled; otherwise - 0.

void engine.varjo.setDepthTestRange ( dvec2 range ) #

Sets a new depth testing range as a two-component vector.

Arguments

  • dvec2 range - New depth testing range to be set: ( Depth Test Near Z, Depth Test Far Z). The range for each component in meters is [0.0, 50.0]. The default depth test range is set to [0.0, 1.0].

dvec2 engine.varjo.getDepthTestRange ( ) #

Returns the current depth testing range as a two-component vector.

Return value

Current depth testing range: ( Depth Test Near Z, Depth Test Far Z). The range for each component in meters is [0.0, 50.0]. The default depth test range is set to [0.0, 1.0].

void engine.varjo.setChromaKey ( int key ) #

Sets a value indicating if chroma keying is enabled. Chroma keying is a video technique where a predefined color is replaced with virtual content. Usually the color to be replaced is bright green or bright blue, as those colors contrast the most with human skin.

Arguments

  • int key - Set 1 to enable chroma keying; or 0 - to disable it.

int engine.varjo.isChromaKey ( ) #

Returns a value indicating if chroma keying is enabled.

Return value

Flag: 1 if chroma keying is enabled; otherwise - 0.

int engine.varjo.getChromaKeyConfigNum ( ) #

Returns the number of chroma key config indices supported. The maximum index will be count-1.

Return value

Number of supported chroma key configs.

void engine.varjo.chromaKeyConfigSubmit ( int index ) #

Applies the chroma key configuration with the specified index.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.

int engine.varjo.getChromaKeyConfigType ( int index ) #

Returns the type of the chroma key configuration with the specified index. Each chroma key configuration index has a config type, which can be used to determine if the slot in the current index is being used. Active configurations have the HSV type.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.

Return value

Chroma key configuration type.

void engine.varjo.setChromaKeyConfigType ( int index, int type ) #

Sets a new type for the chroma key configuration with the specified index. Each chroma key configuration index has a config type, which can be used to determine if the slot in the current index is being used. Active configurations have the HSV type.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.
  • int type - New chroma key configuration type to be set.

vec3 engine.varjo.getChromaKeyConfigFalloff ( int index ) #

Returns the current tolerance falloff values for HSV components of the chroma key target color.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.

Return value

Current tolerance falloff values for HSV components of the chroma key target color. The range for each component is [0.0; 1.0].

void engine.varjo.setChromaKeyConfigFalloff ( int index, vec3 falloff ) #

Sets new tolerance falloff values for HSV components of the chroma key target color.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.
  • vec3 falloff - New tolerance falloff values to be set for HSV components of the chroma key target color. The range for each component is [0.0; 1.0].

vec3 engine.varjo.getChromaKeyConfigTargetColor ( int index ) #

Returns the current chroma key target color.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.

Return value

Current chroma key target color in HSV colorspace. The range for each component is [0.0; 1.0].

void engine.varjo.setChromaKeyConfigTargetColor ( int index, vec3 target_color ) #

Sets a new chroma key target color.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.
  • vec3 target_color - New chroma key target color to be set in HSV colorspace. The range for each component is [0.0; 1.0].

vec3 engine.varjo.getChromaKeyConfigTolerance ( int index ) #

Returns the current tolerance values for HSV components of the chroma key target color.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.

Return value

Current tolerance values for HSV components of the chroma key target color. The range for each component is [0.0; 1.0].

void engine.varjo.setChromaKeyConfigTolerance ( int index, vec3 tolerance ) #

Sets new tolerance values for HSV components of the chroma key target color.

Arguments

  • int index - Chroma key config index in the range fron 0 to config count - 1.
  • vec3 tolerance - New tolerance values for HSV components of the chroma key target color to be set. The range for each component is [0.0; 1.0].

void engine.varjo.setCameraExposureTime ( int value ) #

Sets an exposure time value that is valid for the connected device.

Arguments

  • int value - The valid exposure time value for the connected device.

Vector<double> engine.varjo.getCameraSupportedExposureTimes ( ) #

Returns a vector containing the exposure time values that are set as valid for the connected device.

Return value

The vector containing the valid exposure time values for the connected device.

void engine.varjo.setCameraExposureTime ( double time ) #

Sets a new exposure time value for the camera.

Arguments

  • double time - New exposure time to be set, in frames per second (e.g. 90.0 -> ~11ms).

double engine.varjo.getCameraExposureTime ( ) #

Returns the current exposure time for the camera.

Return value

Current exposure time, in frames per second (e.g. 90.0 -> ~11ms).

void engine.varjo.setCameraExposureTimeAuto ( ) #

Enables automatic exposure adjustment mode for the camera.

void engine.varjo.setCameraExposureTimeManual ( ) #

Enables manual exposure adjustment mode for the camera. In this mode you can set the desired exposure time correction value manually via the setCameraExposureTime() method.

bool engine.varjo.isCameraExposureTimeAuto ( ) #

Returns a value indicating if automatic exposure adjustment mode for the camera is enabled.

Return value

1 if automatic exposure adjustment mode for the camera is enabled; otherwise - 0.

void engine.varjo.setCameraWhiteBalance ( int balance ) #

Sets a white balance correction value that is valid for the connected device.

Arguments

void engine.varjo.setCameraWhiteBalance ( int balance ) #

Sets a white balance correction value that is valid for the connected device.

Arguments

  • int balance - New color temperature value to be set.

int engine.varjo.getCameraWhiteBalance ( ) #

Returns the current white balance correction value for the camera.

Return value

Current color temperature value.

void engine.varjo.setCameraWhiteBalanceAuto ( ) #

Enables automatic white balance adjustment mode for the camera.

void engine.varjo.setCameraWhiteBalanceManual ( ) #

Enables manual white balance adjustment mode for the camera. In this mode you can set the desired white balance correction value manually via the getCameraWhiteBalance() method.

bool engine.varjo.isCameraWhiteBalanceAuto ( ) #

Returns a value indicating if automatic white balance adjustment mode for the camera is enabled.

Return value

1 if automatic white balance adjustment mode for the camera is enabled; otherwise - 0.

Vector<int> engine.varjo.getCameraSupportedWhiteBalances ( ) #

Returns a vector containing the white balance values that are set as valid for the connected device.

Return value

The vector containing the supported white balance values for the connected device.

void engine.varjo.setCameraISO ( int cameraiso ) #

Sets a new ISO value that is valid for the connected device.

Arguments

  • int cameraiso - New ISO value to be set. One of the CAMERA_ISO_* values.

void engine.varjo.setCameraISO ( int cameraiso ) #

Sets a new ISO value that is valid for the connected device.

Arguments

  • int cameraiso - New ISO value to be set (e.g., "200" -> ISO200).

int engine.varjo.getCameraISO ( ) #

Returns the current ISO value for the camera.

Return value

Current ISO value set for the camera (e.g., "200" -> ISO200).

void engine.varjo.setCameraISOAuto ( ) #

Enables automatic ISO adjustment mode for the camera.

void engine.varjo.setCameraISOManual ( ) #

Enables manual ISO adjustment mode for the camera. In this mode you can set the desired ISO value manually via the setCameraISO() method.

bool engine.varjo.isCameraISOAuto ( ) #

Returns a value indicating if automatic ISO adjustment mode for the camera is enabled.

Return value

1 if automatic ISO adjustment mode for the camera is enabled; otherwise - 0.

Vector<int> engine.varjo.getCameraSupportedISO ( ) #

Returns a vector containing the ISO values that are set as valid for the connected device.

Return value

The vector containing the supported ISO values for the connected device.

void engine.varjo.setCameraFlickerCompensation ( int compensation ) #

Sets a new flicker compensation value for the camera. This is useful when using the HMD indoors with mostly artificial light bulbs, which flicker at the frequency of 50Hz or 60Hz and can cause visual flicker artifacts on the video see through image. The correct setting depends on the underlying power grid's frequency. e.g. In most parts of Africa/Asia/Australia/Europe the frequency is 50 Hz and in most parts of North and South America 60 Hz.

Arguments

void engine.varjo.setCameraFlickerCompensation ( int compensation ) #

Sets a new flicker compensation value for the camera. This is useful when using the HMD indoors with mostly artificial light bulbs, which flicker at the frequency of 50Hz or 60Hz and can cause visual flicker artifacts on the video see through image. The correct setting depends on the underlying power grid's frequency. e.g. In most parts of Africa/Asia/Australia/Europe the frequency is 50 Hz and in most parts of North and South America 60 Hz.

Arguments

  • int compensation - Flicker compensation value, in Hz.

int engine.varjo.getCameraFlickerCompensation ( ) #

Returns the current flicker compensation value for the camera. One of the CAMERA_FLICKER_COMPENSATION values.

Return value

Current flicker compensation value, in Hz.

Vector<int> engine.varjo.getCameraSupportedFlickerCompensations ( ) #

Returns a vector containing the flicker compensation values that are set as valid for the connected device.

Return value

The vector containing the supported flicker compensation values for the connected device.

void engine.varjo.setCameraSharpness ( int sharpness ) #

Sets a new sharpness filter power value for the camera.

Arguments

  • int sharpness - New sharpness filter power value to be set: lowest value corresponds to small amount of filtering and the highest value corresponds to the largest amount of filtering.

int engine.varjo.getCameraSharpness ( ) #

Returns the current sharpness filter power value for the camera.

Return value

Current sharpness filter power value: lowest value corresponds to small amount of filtering and the highest value corresponds to the largest amount of filtering.

int engine.varjo.getCameraMinSharpness ( ) #

Returns the minimum possible value for the camera sharpness.

Return value

The minimum possible value for the camera sharpness.

int engine.varjo.getCameraMaxSharpness ( ) #

Returns the maximum possible value for the camera sharpness.

Return value

The maximum possible value for the camera sharpness.

void engine.varjo.setMarkerTrackingEnabled ( int enabled ) #

Sets a value indicating if marker tracking is enabled.

Arguments

  • int enabled - Set true to enable marker tracking; or false - to disable it.

int engine.varjo.isMarkerTrackingEnabled ( ) #

Returns a value indicating if marker tracking is enabled.

void engine.varjo.setMarkerLifetime ( float lifetime, Vector<ullong>& OUT_marker_ids ) #

Sets a lifetime for markers under specified ids.

Arguments

  • float lifetime - Lifetime to be set.
  • Vector<ullong>& OUT_marker_ids - Marker ids to receive a new lifetime.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

void engine.varjo.setMarkerLifetime ( float lifetime, long marker_id ) #

Sets a lifetime for a marker under specified id.

Arguments

  • float lifetime - Lifetime to be set.
  • long marker_id - A marker id to receive a new lifetime.

void engine.varjo.setMarkerFlags ( int flags, Vector<ullong>& OUT_marker_ids ) #

Sets the flags for all markers by specified ids.

Arguments

  • int flags - New flags to set up.
  • Vector<ullong>& OUT_marker_ids - Marker ids to receive new flags.
    Notice
    This output buffer is to be filled by the Engine as a result of executing the method.

void engine.varjo.setMarkerFlags ( int flags, long marker_id ) #

Sets the flags for a marker by a specified id.

Arguments

  • int flags - New flags to set up.
  • long marker_id - Marker id to receive new flags.

int engine.varjo.getMarkerObjectNum ( ) #

Returns the number of visible marker objects.

MarkerObject engine.varjo.getMarkerObject ( int index ) #

Returns the marker object with the specified marker index.

Arguments

  • int index - Marker index.

Return value

Marker object.

void engine.varjo.setStreamEnvironmentCubemapEnabled ( int enabled ) #

Enables or disables the cubemap streaming from AR cameras.

Arguments

  • int enabled - 1 to enable the cubemap streaming; 0 to disable it.

int engine.varjo.isStreamEnvironmentCubemapEnabled ( ) #

Returns a value indicating if the cubemap streaming from AR cameras is enabled.

Return value

1 if the cubemap streaming is enabled; otherwise - 0.

void engine.varjo.setStreamColorCorrectionEnabled ( int enabled ) #

Enables or disables the AR cameras streaming exposition.

Arguments

  • int enabled - 1 to enable the streaming exposition; 0 to disable it.

int engine.varjo.isStreamColorCorrectionEnabled ( ) #

Returns a value indicating if the AR cameras streaming exposition is enabled.

Return value

1 if the streaming exposition is enabled; otherwise - 0.

void engine.varjo.setStreamEnvironmentCubemapGGXQuality ( float quality ) #

Sets the quality of the generated GGX mips for the AR cubemap.

Arguments

  • float quality - Quality value within the [0.0f; 1.0f] range.

float engine.varjo.getStreamEnvironmentCubemapGGXQuality ( ) #

Returns the quality of the generated GGX mips for the AR cubemap.

Return value

Quality value within the [0.0f; 1.0f] range.

void engine.varjo.setViewOffset ( double offset ) #

Sets the eyes view offset.

Arguments

  • double offset - View offset.

double engine.varjo.getViewOffset ( ) #

Returns the eyes view offset.

Return value

View offset.

void engine.varjo.setStreamEnvironmentCubemapMode ( int mode ) #

Sets the mode defining the way the AR texture is set for the environment.

Arguments

  • int mode - Environment mode.

int engine.varjo.getStreamEnvironmentCubemapMode ( ) #

Returns the mode defining the way the AR texture is set for the environment.

Return value

Environment mode.

void engine.varjo.setStreamEnvironmentCubemapPresetIndex ( int index ) #

Sets the index of the environment preset to which the texture is set.

Arguments

int engine.varjo.getStreamEnvironmentCubemapPresetIndex ( ) #

Returns the index of the environment preset to which the texture is set.

Return value

Index of the environment preset.

String engine.varjo.getHMDName ( ) #

Returns the current name of the head-mounted display.

Return value

HMD name.

int engine.varjo.getHMDType ( ) #

Returns the type of the head-mounted display.

Return value

HMD type name. One of the HMD_TYPE_* values.

Vec3 engine.varjo.getHandtrackingOffset ( ) #

Returns the offset used for hand tracking (offset for the hand position). This is necessary because the head tracking point for your HMD differs from the hand tracking point for Ultraleap.

Return value

Hand tracking offset along the axes, in units.

void engine.varjo.setMotionPrediction ( int prediction ) #

Enables support for Motion Prediction in Varjo Headsets by allowing engine to submit Velocity from the GBuffer to the Varjo Composer.

Arguments

  • int prediction - 1 to enable support for Motion Prediction; 0 to disable it.

int engine.varjo.isMotionPrediction ( ) #

Returns the value indicating if Motion Prediction in Varjo Headsets is enabled.

Return value

1 if support for Motion Prediction is enabled; otherwise - 0.

void engine.varjo.setMotionPredictionVelocityPrecision ( float precision ) #

Sets the factor of velocity scale before packing floating point value into 2x8 bit uint.

Arguments

  • float precision - The factor of velocity scale before packing floating point value into 2x8 bit uint.

float engine.varjo.getMotionPredictionVelocityPrecision ( ) #

Returns the factor of velocity scale before packing floating point value into 2x8 bit uint.

Return value

The factor of velocity scale before packing floating point value into 2x8 bit uint.

void engine.varjo.setMotionPredictionVelocityTimeDelta ( float delta ) #

Sets the factor for optimizing between fast and slow moving objects. Smaller number works better for fast moving objects and vice versa.

Arguments

  • float delta - The factor for optimizing between fast and slow moving objects.

float engine.varjo.getMotionPredictionVelocityTimeDelta ( ) #

Returns the factor for optimizing between fast and slow moving objects.

Return value

The factor for optimizing between fast and slow moving objects.

void engine.varjo.render ( Player player, ivec2 size, bool render_window ) #

Calls Varjo rendering logic.

Arguments

  • Player player - The player camera.
  • ivec2 size - The window size, in pixels.
  • bool render_window - 1 to enable rendering of a copy to the current render target window; 0 — to disable it.

void engine.varjo.setFocusViewportSupersamplingFactor ( float factor = 1.0f ) #

Sets the additional supersampling factor for the Varjo focus viewport.

Arguments

  • float factor - The additional supersampling factor, a float value greater than 0.

float engine.varjo.getFocusViewportSupersamplingFactor ( ) #

Returns the additional supersampling factor for the Varjo focus viewport.

Return value

The additional supersampling factor.

void engine.varjo.setStreamColorCorrectionWhiteBalanceEnabled ( int enabled ) #

Enables white balance correction for the stream.

Arguments

  • int enabled - 1 to enable white balance correction for the stream; 0 to disable it.

int engine.varjo.isStreamColorCorrectionWhiteBalanceEnabled ( ) #

Returns the value indicating if white balance correction for the stream is enabled.

Return value

1 if white balance correction for the stream is enabled; otherwise - 0.

void engine.varjo.setBlendMaskingMode ( int mode ) #

Sets the mode of the Blend Control Mask that can be used to extend or restrict the chroma-key mask or to control the depth testing against the estimated video depth.

Arguments

int engine.varjo.getBlendMaskingMode ( ) #

Returns a value representing the mode of the Blend Control Mask that can be used to extend or restrict the chroma-key mask or to control the depth testing against the estimated video depth.

Return value

The masking mode. One of the BLEND_MASKING_MODE_* variables.

void engine.varjo.setBlendMaskingDebugEnabled ( int enabled ) #

Enables blend masking debug visualization.

Arguments

  • int enabled - 1 to enable blend masking debug visualization; 0 to disable it.

int engine.varjo.isBlendMaskingDebugEnabled ( ) #

Returns the value indicating if blend masking debug visualization is enabled.

Return value

1 if blend masking debug visualization is enabled; otherwise - 0.
Last update: 2024-05-03
Build: ()