Main Content

与虚拟现实世界互动

Create and interact with MATLAB®virtual world objects, input virtual world data to Simulink®楷模

您可以使用MATLAB功能和类与虚拟现实世界进行交互。创建虚拟世界对象(vrobject) and node objects (vrnode) to represent a virtual world that you create with万博1manbetxSimulink 3D Animation™。通过使用可用虚拟世界节点及其字段设置值vrnode对象方法。

Virtual reality scenes can contain sensors, which are nodes that generate events and output values depending on time, navigation, and actions and distance changes in the scene. These nodes add interactivity to the virtual world. You can useSimulink 3D Animation函数来读取传感器字段值为装病者ion models and control simulation based on the user interaction with the virtual scene. You can write an S-function or aMATLAB Functionblock that reads the sensor output.

功能

expand all

vrworld 创建新的vrworld与虚拟世界相关的对象
vrdrawnow 更新虚拟世界
vrnode Create node or handle to existing node
vr.canvas Create virtual reality canvas
vrclear Remove all closed virtual worlds from memory
vrwho List virtual worlds in memory
vrwhos 列出有关记忆中虚拟世界的详细信息
vrfigure Create virtual reality figure
capture 捕获虚拟现实图像图像
Close virtual reality figure
get 返回属性值vrfigure目的
已验证 检查有效性vrfigure对象处理
设置属性值vrfigure目的
VRGCF 动作虚拟现实图
vrgcbf Current callbackvrfigure目的
vrclose 关闭虚拟现实图形窗口
vr.utils.stereo3d 立体视觉设置vr.canvasandvr.figure对象
vrdir2ori 将视图方向转换为方向
vrori2dir 兑换viewpoint orientation to direction
vrrotvec Calculate rotation between two vectors
vrrotmat2vec 兑换rotation from matrix to axis-angle representation
vrrotvec2mat 兑换rotation from axis-angle to matrix representation
VRIFS2PATCH 转换虚拟世界IndexedFaceSet节点MATLAB补丁
vrpatch2ifs 兑换MATLAB补丁toIndexedFaceSetnodes
vrjoystick Create joystick object
vrspacemouse Create space mouse object

Blocks

VR Source Read data from virtual world to万博1manbetxmodel

MATLAB Interaction

虚拟现实世界和动态系统示例

使用接口的虚拟世界来模拟框图以及MATLAB对象和函数。万博1manbetx

Create vrworld Object for a Virtual World

Connect MATLAB to a virtual world and interact with that virtual world through the MATLAB command-line interface by creating vrworld and vrnode objects.

Open a Virtual World with MATLAB

打开一个虚拟世界,以在虚拟世界观看器中查看虚拟世界,扫描其结构,并从MATLAB命令窗口更改虚拟世界属性。

Interact with a Virtual World with MATLAB

通过使用VRNode对象方法与虚拟世界进行交互,为所有可用的虚拟世界节点及其字段设置VRWorld对象属性值。

关闭并删除VRWorld对象

Close virtual worlds and remove them from memory.

Virtual World Data Types

Explore the data types used by nodes for defining objects and the types of data that can appear in the node fields and events.

VRML Sensor Input to Models

Use Sensors

Move or modify virtual world objects during simulation based on user input from the virtual world or events in the virtual world.

通过传感器事件修改远程虚拟世界

交互式模式允许客户端通过来自虚拟世界中定义的传感器节点的事件来修改远程虚拟世界。

Detect Object Collisions

Use collision detection to avoid having two objects collide, or to trigger a change in virtual world object behavior or display.