This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
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
Учебные материалы

Unigine.InputVRDevice Class

The base class for VR devices. It provides access to properties and settings that all VR devices have. For example, you can get a device name, check if it has a battery, or whether it will drift in a specific direction, and so on.

Also, the class functionality allows getting the model of the VR device. For example, you can use it for controller rendering:

  1. Get the controller to render by using the corresponding methods of the Input class. For example, to get the left controller, call getVRControllerLeft().
  2. Check it exists.
  3. Get the number of its models via getNumModels().
  4. Load its meshes and textures individually, one by one, or get the entire mesh at once. Note that there may be a delay during the loading process.
  5. Render the loaded meshes with textures.

InputVRDevice Class

Перечисления (Enums)

TYPE#

ИмяОписание
INPUT_VR_UNKNOWN = 0Unknown VR device.
INPUT_VR_DEVICE = 1VR device.
INPUT_VR_HEAD = 2Head-mounted display.
INPUT_VR_CONTROLLER = 3Controller.
INPUT_VR_TRACKER = 4Tracker.
INPUT_VR_BASE_STATION = 5Base station.
NUM_TYPES = 6Total number of types of the VR devices.

Properties

bool IsAvailable#

The true if the device is available; otherwise, false.

int Number#

The Device index.

string Name#

The Device name.

Input.DEVICE DeviceType#

The Input device type.

InputVRDevice.TYPE Type#

The VR device type.

string DeviceModelName#

The Model name.

bool IsCharging#

The true if the device is charging; otherwise, false.

float BatteryValue#

The Battery level, in percents.

string ModelNumber#

The Model number.

string SerialNumber#

The Seril number.

string ManufacturerName#

The Vendor name.

ulong HardwareRevision#

The Hardware revision.

ulong FirmwareVersion#

The Firmware version

mat4 WorldTransform#

The World transformation matrix.

mat4 Transform#

The Local transformation matrix.

vec3 LinearVelocity#

The Linear velocity.

vec3 AngularVelocity#

The Angular velocity.

vec3 AngularAcceleration#

The Angular acceleration.

bool IsTransformValid#

The true if transformation is valid; otherwise, false.

int NumModels#

The Number of models.

Mesh CombinedModelMesh#

The Mesh of the combined model.

Texture CombinedModelTexture#

The Texure of the combined model.

string CombinedModelName#

The Name of the combined model.

Members


bool HasYawDrift ( ) #

Returns a value indicating if the VR device will drift in a specific direction.

Return value

true if the device has yaw drift; otherwise, false.

bool HasBattery ( ) #

Returns a value indicating if the VR device has a battery.

Return value

true if the device has the battery; otherwise, false.

bool CanReportBatteryValue ( ) #

Returns a value indicating if the VR device provides the battery status.

Return value

true if the battery status is provided; otherwise, false.

mat4 GetModelTransform ( int num ) #

Returns the local transformation of the given model.

Arguments

  • int num - Model index.

Return value

Local transformation matrix of the model.

mat4 GetModelWorldTransform ( int num ) #

Returns the world transformation of the given model.

Arguments

  • int num - Model index.

Return value

World transformation matrix of the model.

Mesh GetModelMesh ( int num ) #

Returns the mesh of the given model.

Arguments

  • int num - Model index.

Return value

Model mesh.

Texture GetModelTexture ( int num ) #

Returns the texture of the given model.

Arguments

  • int num - Model index.

Return value

Model texture.

string GetModelName ( int num ) #

Returns the name of the given model.

Arguments

  • int num - Model index.

Return value

Model name.
Last update: 19.04.2024
Build: ()