This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::VREyeTracking Class

Header: #include <UnigineVREyeTracking.h>

The class is used for eye tracking management in Varjo devices.

VREyeTracking Class

枚举

STATUS#

Name说明/描 述
STATUS_INVALID = 0Data is not available, user is not wearing the device or eyes cannot be found.
STATUS_ADJUST = 1User is wearing the device, but gaze tracking is being calibrated.
STATUS_VALID = 2Data is valid.

EYE_STATUS#

Name说明/描 述
EYE_STATUS_INVALID = 0Eye is not tracked and not visible (for example, eye is shut).
EYE_STATUS_VISIBLE = 1Eye is visible but not reliably tracked (for example, saccade or blink).
EYE_STATUS_COMPENSATED = 2Eye is tracked but quality compromised (for example, headset has moved after calibration).
EYE_STATUS_TRACKED = 3Eye is tracked.

Members

bool isValid() const#

Returns the current value indicating if eye tracking is valid.

Return value

true if eye tracking is valid; otherwise false.

Math::Vec3 getFocusWorldPosition() const#

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

Return value

Current world position of the eye focus point.

Math::vec3 getGazeWorldDirection() const#

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

Return value

Current direction vector for both eyes

Math::Vec3 getLeftEyeWorldPosition() const#

Returns the current position of the left eye in world coordinates.

Return value

Current world position of the left eye.

Math::vec3 getLeftEyeWorldDirection() const#

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

Return value

Current direction vector of the left eye.

float getLeftPupilDiameter() const#

Returns the current estimated diameter of the left pupil. The function returns 0.0f if the pupil is not tracked or the estimate is unavailable.

Return value

Current diameter of the left pupil, in millimeters.

getLeftPupilIrisDiameterRatio() const#

Returns the current ratio between the left pupil diameter estimate and the estimated diameter of the left iris. If either estimate is unavailable, preventing the calculation of the ratio, the function returns 0.0f.

Return value

Current ratio of the left pupil diameter estimate to the estimated left iris diameter.

float getLeftIrisDiameter() const#

Returns the current an estimated diameter of the left iris. The function returns 0.0f if the estimate is unavailable.

Return value

Current diameter of the left iris, in millimeters.

float getLeftOpenness() const#

Returns the current estimated openness ratio of the left eye. 1.0f corresponds to a fully open eye, 0.0f to a fully closed eye.

Return value

Current estimated openness ratio of the left eye in range [0.0f;1.0f].

VREyeTracking::EYE_STATUS getLeftStatus() const#

Returns the current status of the left eye.

Return value

Current status of the left eye.

float getRightPupilDiameter() const#

Returns the current estimated diameter of the right pupil. The function returns 0.0f if the pupil is not tracked or the estimate is unavailable.

Return value

Current diameter of the right pupil, in millimeters.

float getRightPupilIrisDiameterRatio() const#

Returns the current ratio between the right pupil diameter estimate and the estimated diameter of the left iris. If either estimate is unavailable, preventing the calculation of the ratio, the function returns 0.0f.

Return value

Current ratio of the right pupil diameter estimate to the estimated left iris diameter.

float getRightIrisDiameter() const#

Returns the current an estimated diameter of the right iris. The function returns 0.0f if the estimate is unavailable.

Return value

Current diameter of the right iris, in millimeters.

float getRightOpenness() const#

Returns the current estimated openness ratio of the right eye. 1.0f corresponds to a fully open eye, 0.0f to a fully closed eye.

Return value

Current estimated openness ratio of the right eye in range [0.0f;1.0f].

Math::Vec3 getRightEyeWorldPosition() const#

Returns the current position of the right eye in world coordinates.

Return value

Current world position of the right eye.

Math::vec3 getRightEyeWorldDirection() const#

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

Return value

Current direction vector of the right eye.

VREyeTracking::EYE_STATUS getRightStatus() const#

Returns the current status of the right eye.

Return value

Current status of the right eye.

float getIPD() const#

Returns the current interpupillary distance (IPD).

Return value

Current interpupillary distance.

long long getRawCaptureTime() const#

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

Return value

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

double getFocusDistance() const#

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

Return value

Current distance between the eye and the focus point.

double getStability() const#

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

Return value

Current stability of the user’s focus in range [0.0;1.0].

VREyeTracking::STATUS getStatus() const#

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

Return value

Current value representing the status of eye tracking.

long long getRawFrame() const#

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

Return value

Current unique identifier of the frame when the data was recorded.

void setVisualizerEnabled ( bool enabled ) #

Sets a new value indicating if the visualizer is enabled.

Arguments

  • bool enabled - Set true to enable the visualizer; false - to disable it.

bool isVisualizerEnabled() const#

Returns the current value indicating if the visualizer is enabled.

Return value

true if the visualizer is enabled; otherwise false.

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.
Last update: 2024-03-25
Build: ()