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
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
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

类和组件概述

When you open your project based on the VR Sample for the first time and see a lot of different classes, you might get confused a bit. But let's take a quick look at each of them to see what they actually do and how they are connected.当您第一次基于VR Sample打开项目并看到很多不同的类时,您可能会感到困惑。 但是,让我们快速浏览一下它们中的每一个,看看它们实际上做了什么以及它们是如何连接的。

VRInteractable Class
VRInteractable类#

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:以下组件类继承自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 (various 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).这种组件类型可用于所有对象,可以通过抓取(各种按钮和开关,包括旋转开关)进行切换。
ObjLaserPointerThis component enables casting a laser ray by the object.
注意
The laser pointer object in the VR Sample world has ObjMovable and ObjLaserPointer components attached.The laser pointer object in the VR Sample world has ObjMovable and ObjLaserPointer components attached.
The laser pointer object in the VR Sample world has ObjMovable and ObjLaserPointer components attached.
该组件使物体能够投射激光射线.
注意
The laser pointer object in the VR Sample world has ObjMovable and ObjLaserPointer components attached.VR示例世界中的激光指示器对象附加了ObjMovableObjLaserPointer组件。

VRPlayer Class
VRPlayer类#

This is a base class for all players. It contains declaration of baseline controls, common basic player operations, callback management etc.这是所有玩家的基类。 它包含基线控件的声明,常见的基本玩家操作,回调管理等。

注意
You can check out baseline controls for VR Controllers here.您可以在这里查看VR控制器的基线控制。

The following component classes are inherited from the VRPlayer:以下组件类继承自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.该组件实现了一个带有标准PC输入设备(键盘+鼠标或Xbox360控制器)的玩家,用于VR仿真,并包含所有相关设置和方法。
VRPlayerVR This is a base class implementing common functionality for supported VR devices and contains their common parameters. The UltraleapHandController class is inherited from VRPlayerVR and available when the Ultraleap plugin is loaded.这是一个为支持的VR设备实现通用功能的基类,并包含它们的通用参数。 UltraleapHandController类继承自VRPlayerVR,并在加载Ultraleap插件时可用。

VRPlayerSpawner Class
VRPlayerSpawner类#

This class registers all VRPlayer components in the Component System. It checks that VR is initialized and spawns the VRPlayerVR.此类注册组件系统中的所有VRPlayer组件。 它检查VR是否已初始化并生成VRPlayerVR

注意
In case if VR was not initialized, a VRPlayerPC is spawned.如果VR未初始化,则会生成VRPlayerPC

MenuBaseGUI Class
MenuBaseGUI类#

This is a base class for all graphic user interfaces (GUI).这是所有图形用户界面(GUI)的基类。

The following component classes are inherited from the MenuBaseGUI:以下组件类继承自MenuBaseGUI

注意
These components can be attached to GUI objects only.这些组件只能附加到GUI对象
HandSampleMenuGui This component implements initialization of widgets for the menu that is attached to a controller.此组件实现附加到控制器的菜单的小部件的初始化。
WorldMenuSampleGui This component implements initialization of widgets for the world menu.此组件实现世界菜单的小部件的初始化。
MixedRealityMenuGui This component implements initialization of widgets for the menu that is attached to an HMD.此组件实现附加到HMD的菜单的小部件的初始化。

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.框架包括实现组件核心功能的组件系统和一组用于播放声音的实用程序类和函数,辅助数学和3d数学函数,回调系统实现。

Triggers Class
Triggers类#

Triggers is a framework class used to mark room obstacles for the VR Player (e.g. room walls, objects, etc.) and give a warning if there is an obstacle on the way (as the player gets closer to an obstacle, controllers' vibration becomes more intense).Triggers是一个框架类,用于为VR玩家标记房间障碍物(例如房间墙壁、物体等),并在途中有障碍物时发出警告(随着玩家越来越接近障碍物,控制器的振动变得更加强烈)。

注意
Obstacles are not available for VRPlayerPC.障碍不可用于VRPlayerPC

You can simply create primitives for walls and objects in your room and add them as children to the node dummy named Obstacles, which is a child of the VR dummy node (see the hierarchy in the Editor below).您就可以为房间中的墙壁和对象创建基元,并将它们作为子节点添加到名为Obstacles节点虚拟中,该节点是VR dummy node的子节点(请参阅下面编辑器中的层次结构)。

All children of the Obstacles node will be automatically switched to invisible mode and will be used only to inform the player and prevent collisions with objects in the real room.Obstacles节点的所有子节点将自动切换到不可见模式,仅用于通知玩家并防止与真实房间中的物体发生碰撞。

注意
Primitives used to mark obstacles must have their first surface (the one with the 0 index) named as "box", "sphere", "capsule" or "cylinder" in order to be properly converted into corresponding trigger volumes.用于标记障碍物的基元必须将其第一个表面(索引为0的那个)命名为"box", "sphere", "capsule""cylinder",以便正确转换为相应的触发体积。
最新更新: 2024-12-13
Build: ()