Skip to Main Content Skip to Search
Product Documentation

vrfigure - Create new virtual reality figure

Syntax

f = vrfigure(world)
f = vrfigure(world,position)
f = vrfigure
f = vrfigure([])

Description

f = vrfigure(world) creates a new virtual reality figure showing the specified world and returns an appropriate vrfigure object. The input argument world must be a vrworld object.

f = vrfigure(world,position) creates a new virtual reality figure at the specified position.

f = vrfigure returns an empty vrfigure object that does not have a visual representation.

f = vrfigure([]) returns an empty vector of type vrfigure.

Creating a virtual figure with this method creates and displays the figure in the viewer specified in the vrsetpref DefaultViewer property.

Method Summary

MethodDescription
captureCreate RGB image from virtual reality figure
closeClose virtual reality figure
getProperty value of vrfigure object
isvalid1 if vrfigure object is valid, 0 if not
setChange property value of vrfigure object

Examples

Create a vrworld object. At the MATLAB command prompt, type

myworld = vrworld('vrmount.wrl')

The vrworld object myworld is associated with the virtual world vrmount.wrl.

Next, open the virtual world using the vrworld object. You must open the virtual world before you can view it. At the MATLAB command prompt, type

open(myworld)

You can now view the virtual world in the Simulink 3D Animation viewer by typing

f = vrfigure(myworld)

Your viewer opens and displays the virtual scene.

See Also

vrworld | vrworld/open

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS