This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Create vrworld Object for a Virtual World

To connect MATLAB® to a virtual world and to interact with that virtual world through the MATLAB command-line interface, create vrworld and vrnode objects. A virtual world 3D file defines a virtual world.

    Note   The Simulink® interface and the MATLAB interface share virtual world objects. This sharing of objects enables you to use the MATLAB interface to change the properties of vrworld objects originally created by Simulink with Simulink 3D Animation™ blocks.

After you create a virtual world, you can create a vrworld object. This procedure uses the virtual world vrmount.wrl as an example.

  1. Open MATLAB. In the MATLAB Command Window, type

    myworld = vrworld('vrmount.wrl')

    The MATLAB Command Window displays output like

    myworld = 
    	vrworld object: 1-by-1
    VR Car in the Mountains 
  2. Type


    The MATLAB Command Window displays the messages

    		Closed, associated with  
    		Visible for local viewers.
    		No clients are logged on.

The vrworld object myworld is associated with the virtual world vrmount.wrl. You can think of the variable myworld as a handle to the vrworld object stored in the MATLAB workspace.

Your next step is to open a virtual world using the vrworld object. See Open a Virtual World with MATLAB.

See Also


Related Topics

Was this topic helpful?