This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and 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
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
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.

Classes and Components Overview

When you first open your project based on the VR Sample and see a lot of different classes you might get confused a bit. But let's take a quick look at each of them and see what they actually do and how they are related to each other.

VRInteractable Class#

This is a base class for all objects, that you can interact with. It defines a basic set of interactions, in other words: here you define what can a user do with your object. You can add your own type of interaction here.

The following component classes are inherited from the VRInteractable:

ObjMovableThis component type can be used for all objects, that can be grabbed, held and thrown (it can be a ball, a pistol, whatever you can take, carry and drop).
ObjHandleThis component type can be used for all objects, that can be turned or moved while being held (variuos handles, levers, valves, etc.).
ObjSwitchThis component type can be used for all objects, that can be switched by grabbing (all sorts of buttons and on-off switches, including rotary ones).
ObjButtonThis component type demonstrates animated text, when grabbed, and can be used in combination with the ObjSwitch component to provide additional effects.
ObjLaserPointerThis component enables casting a laser ray by the object.
Notice
The laser pointer object in the VR Sample world has ObjMovable and ObjLaserPointer components attached.

VRPlayer Class#

This is a base class for all players. It contains declaration of baseline controls, common basic player operations, callback management etc.

Notice
You can check out baseline controls for VR Controllers (Vive, Oculus, XBox) here.

The following component classes are inherited from the VRPlayer:

VRPlayerPCThis component implements a player with standard PC input devices (keyboard + mouse or Xbox360 controller) for VR emulation and contains all related settings and methods.
VRPlayerVR This is a base class implementing common functionality for supported VR devices and contains their common parameters. The following classes are inherited from VRPlayerVR:
  • VRPlayerOcculus - implements basic operations and bindings for Oculus Rift device
  • VRPlayerVive - implements basic operations and bindings for HTC Vive device

VRPlayerSpawner Class#

This class registers all VRPlayer components in the Component System, checks which VR plugin is loaded and creates a player of the corresponding type (VRPlayerOcculus or VRPlayerVive). It also enables and shows necessary controllers.

Notice
In case if no VR plugin was loaded, a VRPlayerPC is spawned.

AppOculusProxy and AppViveProxy Classes#

Both plugins implementing HMD support (AppOculus and AppVive) have UnigineScript interface. So, in order to use them in our C++ project we need a proxy class (sort of API "translator") for each of them, wrapping UnigineScript methods in C++.

GuiSample Class#

This component type is used to create various graphic user interfaces (GUI). Here you can add widgets (labels, buttons, etc.) and implement event handlers for them.

Notice
This component can be attached to GUI objects only.

Framework#

Framework includes the Component System which implements the core functionality of components and a set of utility classes and functions used for playing sounds, auxiliary math and 3d math functions, callback system implementation .

Last update: 2018-12-27
Build: ()