This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
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
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::InputVRHead Class

Header: #include <UnigineInput.h>
Inherits from: InputVRDevice

The class handles head-mounted display (HMD) input.

InputVRHead Class

枚举

MODEL_TYPE#

Name描述
MODEL_TYPE_UNKNOWN = 0Unknown HMD.
MODEL_TYPE_OCULUS_BEGIN = 1The first element to be used for iteration through the model types of the Oculus Rift HMD.
MODEL_TYPE_OCULUS_DK2 = 1Oculus Rift DK2
MODEL_TYPE_OCULUS_CB = 2Oculus Rift CB
MODEL_TYPE_OCULUS_OTHER = 3Other model of the Oculus Rift HMD.
MODEL_TYPE_OCULUS_E3_2015 = 4Oculus Rift E3 2015
MODEL_TYPE_OCULUS_ES06 = 5Oculus Rift ES06
MODEL_TYPE_OCULUS_ES09 = 6Oculus Rift ES09
MODEL_TYPE_OCULUS_ES11 = 7Oculus Rift ES11
MODEL_TYPE_OCULUS_RIFT = 8Oculus Rift CV1
MODEL_TYPE_OCULUS_RIFT_S = 9Oculus Rift Rift S
MODEL_TYPE_OCULUS_END = 9The last element to be used for iteration through the model types of the Oculus Rift HMD.
MODEL_TYPE_VARJO_BEGIN = 10The first element to be used for iteration through the model types of the Varjo HMD.
MODEL_TYPE_VARJO_VR_1 = 10Varjo VR-1
MODEL_TYPE_VARJO_XR_1 = 11Varjo XR-1
MODEL_TYPE_VARJO_VR_2 = 12Varjo VR-2
MODEL_TYPE_VARJO_VR_2_PRO = 13Varjo VR-2 Pro
MODEL_TYPE_VARJO_VR_3 = 14Varjo VR-3
MODEL_TYPE_VARJO_XR_3 = 15Varjo XR-3
MODEL_TYPE_VARJO_AERO = 16Varjo AERO
MODEL_TYPE_VARJO_END = 16The last element to be used for iteration through the model types of the Varjo HMD.
MODEL_TYPE_OPENVR_BEGIN = 17The first element to be used for iteration through the model types of the HMD.
MODEL_TYPE_OPENVR_HTC_VIVE = 17HTC Vive
MODEL_TYPE_OPENVR_HTC_VIVE_PRO = 18HTC Vive Pro MV
MODEL_TYPE_OPENVR_HTC_FOCUS = 19HTC Vive Focus
MODEL_TYPE_OPENVR_VALVE_INDEX = 20Valve Index
MODEL_TYPE_OPENVR_END = 20The last element to be used for iteration through the model types of the HMD.
NUM_MODEL_TYPES = 21Total number of HMD model types.

Members


InputVRHead::MODEL_TYPE getModelType ( ) const#

Returns the model type of the HMD.

Return value

HMD model type.

bool hasButtons ( ) const#

Returns a value indicating if the HMD has buttons.

Return value

true if there are buttons; otherwise, false.

Vector<float> getSupportedRefreshRates ( ) const#

Returns an array of supported display refresh rates, in Hz, with at least one supported refresh rate.

Return value

The vector of supported display refresh rates, in Hz.

void setRefreshRate ( float rate ) #

Sets the display refresh rate, if supported.

Arguments

  • float rate - The display refresh rate, in Hz.

float getRefreshRate ( ) const#

Returns the current display refresh rate, in Hz.

Return value

The display refresh rate, in Hz.

void setTrackingPositionEnabled ( bool enabled ) #

Sets the value indicating if head position tracking is enabled.

Arguments

  • bool enabled - true to enable position tracking; false to disable it.

bool isTrackingPositionEnabled ( ) const#

Returns a value indicating if head position tracking is enabled.

Return value

true if position tracking is enabled; otherwise, false.

void setTrackingRotationEnabled ( bool enabled ) #

Sets the value indicating if head rotation tracking is enabled.

Arguments

  • bool enabled - true to enable rotation tracking; false to disable it.

bool isTrackingRotationEnabled ( ) const#

Returns a value indicating if head rotation tracking is enabled.

Return value

true if rotation tracking is enabled; otherwise, false.

bool isButtonPressed ( Input::VR_BUTTON button ) const#

Returns a value indicating if the specified button is pressed. Check this value to perform continuous actions.

Arguments

Return value

true if the button is pressed; otherwise, false.

bool isButtonDown ( Input::VR_BUTTON button ) const#

Returns a value indicating if the specified button was pressed during the current frame.

Arguments

Return value

true if the button was pressed; otherwise, false.

bool isButtonUp ( Input::VR_BUTTON button ) const#

Returns a value indicating if the specified button was released during the current frame.

Arguments

Return value

true if the button was released; otherwise, false.

Ptr<InputEventVRButton> getButtonEvent ( Input::VR_BUTTON button ) const#

Returns the currently processed HMD button input event.

Arguments

Return value

HMD button input event, or nullptr if there are no events for the specified button in the current frame.

int getButtonEvents ( Input::VR_BUTTON button, Vector<Ptr<InputEventVRButton>> & OUT_events ) #

Returns the number of input events for the specified HMD button and puts the events to the specified output buffer.

Arguments

Return value

Number of input events for the specified HMD button.
Last update: 2024-08-16
Build: ()