Interact with Virtual Reality Worlds
You can use MATLAB functions and classes to interact with virtual reality worlds. Create a
virtual world object (
vrobject) and node objects
vrnode) to represent a virtual world that you create with
3D Animation™. Change and control the degrees of freedom for the virtual world from
within the MATLAB environment by setting values for the available virtual world nodes and
their fields using
vrnode object methods.
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 use Simulink 3D Animation functions to read sensor field values into simulation models and control simulation based on the user interaction with the virtual scene. You can write an S-function or a MATLAB Function block that reads the sensor output.
|(To be removed) Create new |
|(To be removed) Update virtual world|
|(To be removed) Create node or handle to existing node|
|(To be removed) Create virtual reality canvas|
|(To be removed) Remove all closed virtual worlds from memory|
|(To be removed) List virtual worlds in memory|
|(To be removed) List details about virtual worlds in memory|
Virtual World Figures
|(To be removed) Create virtual reality figure|
|(To be removed) Capture virtual reality figure image|
|(To be removed) Close virtual reality figure|
|(To be removed) Return property value of |
|(To be removed) Check validity of |
|(To be removed) Set property values of |
|(To be removed) Handle for active virtual reality figure|
|(To be removed) Current callback |
|(To be removed) Close virtual reality figure windows|
Virtual World Utilities
|(To be removed) Stereoscopic vision settings for
|(To be removed) Convert viewpoint direction to orientation|
|(To be removed) Convert viewpoint orientation to direction|
|(To be removed) Calculate rotation between two vectors|
|(To be removed) Convert rotation from matrix to axis-angle representation|
|(To be removed) Convert rotation from axis-angle to matrix representation|
|(To be removed) Convert virtual world |
|(To be removed) Convert MATLAB patches to |
|(To be removed) Create joystick object|
|(To be removed) Create space mouse object|
|VR Source||(To be removed) Read data from virtual world to Simulink model|
Connect MATLAB to a virtual world and interact with that virtual world through
the MATLAB command-line interface by creating
Open a virtual world to view the virtual world in a virtual world viewer, scan its structure, and change virtual world properties from the MATLAB Command Window.
Interact with virtual world by using
vrnode object methods
vrworld object property values for all the available
virtual world nodes and their fields.
Close virtual worlds and remove them from memory.
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
Move or modify virtual world objects during simulation based on user input from the virtual world or events in the virtual world.
Interactive mode allows clients to modify a remote virtual world via events from sensor nodes defined in the virtual world.
Use collision detection to avoid having two objects collide, or to trigger a change in virtual world object behavior or display.