Virtual Reality Toolbox | ![]() ![]() |
Write data from the Simulink model to the virtual world
Library
Description
The VR Sink block writes values from its ports to virtual world fields specified in the Block Parameters dialog box.
Data Type Support
A VR Sink block accepts signals of type double
.
Block Parameters Dialog Box
Source file -- VRML file name specifying the virtual world this block is connected to. The View button allows you to view the world in the Virtual Reality Toolbox viewer or a Web browser. The Edit button launches an external VRML editor, and the Reload button reloads the world after you change it. By default, the full path to the associated .wrl
file appears in this text box. If you enter only the filename in this box, the Virtual Reality Toolbox assumes that the .wrl
file resides in the same directory as the model file.
Open VRML viewer automatically -- If you select this check box, the default VRML viewer displays the virtual world after loading the Simulink model.
Allow remote access to world -- If you select this check box, the virtual world is accessible for viewing on a client computer. If it is not selected, the world is visible only on the host computer. This is equivalent to the RemoteView
property of a vrworld object. See MATLAB Interface.
Description -- Description that is displayed in all virtual reality object listings, in the title bar of the Virtual Reality Toolbox viewer, and in the list of virtual worlds on the Virtual Reality Toolbox HTML page. This is equivalent to the Description
property of a vrworld object. See MATLAB Interface.
Sample time -- Enter the sample time or -1
for inherited sample time.
VRML Tree -- This box shows the structure of the VRML file and the virtual world itself.
Nodes that have names are marked with red arrows and can be accessed from MATLAB. Nodes without names, but whose children are named, are also marked with red arrows. This marking scheme makes it possible for you to find all accessible nodes by traversing the tree using arrows. Other nodes have a blue dot before their names.
Fields with settable values have check boxes. Use these check boxes to select the fields you want Simulink to output values to. For every selected field, an input port is created in the block. Input ports are assigned to the selected nodes and fields in the order corresponding to the VRML file.
Fields whose values cannot be written (because their parent nodes do not have names, or because they are not of VRML type eventIn
or exposedField
), have an X-shaped icon.
Show node types -- If you select this check box, node types are shown in the VRML tree.
Show field types -- If you select this check box, field types are shown in the VRML tree.
Show field values -- If you select this check box, the dialog box shows, in the VRML tree, the current numeric values of the fields.
![]() | VR Signal Expander | VR Source | ![]() |