Main Content

vrfigure Class

Superclasses:

(To be removed) Create virtual reality figure

vrfigure will be removed in a future release. For more information, see Version History.

Description

Creates a virtual reality figure.

To access vrfigure properties, use the vrfigure/get method. To change properties, use the vrfigure/set method.

If you create a vrfigure object by specifying a virtual world, the virtual figure displays in the viewer specified in the vrsetpref DefaultViewer property.

Construction

virtual_figure = vrfigure(world) creates a virtual reality figure showing the specified virtual world.

example

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

virtual_figure = vrfigure([]) returns an empty vrfigure object that does not have a visual representation.

virtual_figure = vrfigure returns an empty vector of type vrfigure.

Input Arguments

expand all

Virtual world, specified as a vrworld object.

Note

Open the virtual world that you specify before you create a vrfigure object using that virtual world.

Location and size of virtual figure, specified as the vector in the form [left bottom width height]. Specify measurements in pixels.

Note

On Windows® systems, figure windows cannot be less than 104 pixels wide, regardless of the value of the Position property.

ElementDescription
leftDistance from the left edge of the primary display to the inner left edge of the figure window. This value can be negative on systems that have more than one monitor.
bottomDistance from the bottom edge of the primary display to the inner bottom edge of the figure window. This value can be negative on systems that have more than one monitor.
widthDistance between the right and left inner edges of the figure.
heightDistance between the top and bottom inner edges of the figure.

Example: [230 250 570 510]

Data Types: double

Output Arguments

expand all

If you use a vrworld object as an input argument, virtual_figure is a virtual reality figure, represented by a vrfigure object.

If you use an empty array as an input argument, the vrfigure constructor returns a vector of type vrfigure.

If you do not use an input argument, the vrfigure constructor returns an empty vector of type vrfigure.

Methods

capture(To be removed) Capture virtual reality figure image
close(To be removed) Close virtual reality figure
get(To be removed) Return property value of vrfigure object
isvalid(To be removed) Check validity of vrfigure object handles
set(To be removed) Set property values of vrfigure object

Examples

collapse all

Create a vrworld object that is associated with the virtual world vrmount.wrl. Open and view the virtual world.

myworld = vrworld('vrmount');
open(myworld);
f = vrfigure(myworld);

Figure VR Car in the Mountains contains objects of type hgjavacomponent, uimenu, uipanel, uitoolbar.

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrfigure will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.