Main Content

vrworld/get

(To be removed) Property value of vrworld object

vrworld/get will be removed in a future release. For more information, see Version History.

Syntax

get(vrworld_object)
x = get(vrworld_object)
x = get(vrworld_object, 'property_name')

Arguments

vrworld_object

A vrworld object representing a virtual world.

property_name

Name of the property.

Description

get(vrworld_object) displays all the virtual world properties and their values.

x = get(vrworld_object) returns an M-by-1 structure where the field names are the names of the virtual world properties. Each field contains the associated property value. M is equal to length(vrworld_object).

x = get(vrworld_object, 'property_name') returns the value of the specified property.

  • If vrworld_object is a vector of vrworld handles, the get method returns an M-by-1 cell array of values where M is equal to length(vrworld_object).

  • If property_name is a 1-by-N or N-by-1 cell array of strings containing field names, the get method returns an M-by-N cell array of values.

The following are properties of vrworld objects. Names are not case sensitive.

PropertyValueDescription

Clients

Scalar

Number of clients currently viewing the virtual world. Read only.

ClientUpdates

'off' | 'on'

Default: 'on'

Client cannot or can update the virtual scene. Read/write.

Canvases

Vector of canvases

Vector of handles of canvases currently open for this world.

Description

String.

Default: automatically taken from the virtual world 3D file property title

Description of the virtual world as it appears on the main Web page. Read/write.

Figures

Vector of vrfigure objects

Vector of handles to Simulink® 3D Animation™ Viewer windows currently viewing the virtual world. Read only.

FileName

String

Name of the associated virtual world 3D file. Read only.

Nodes

Vector of vrnode objects

Vector of vrnode objects for all named nodes in the virtual world. Read only.

Open

'off' | 'on'

Default: 'off'

Indicates a closed or open virtual world. Read only.

Record3D

'off' | 'on'

Default: 'off'

Enables 3-D animation recording. Read/write.

Record3DFileName

String.

Default: '%f_anim_%n.wrl'

3-D animation file name. The string can contain tokens that are replaced by the corresponding information when the animation recording takes place. For details, see File Name Tokens. Read/write.

Recording

'off' | 'on'

Default: 'off'

Animation recording toggle. This property acts as the main recording switch. Read/write.

RecordMode

'manual' | 'scheduled'

Default: 'manual'

Animation recording mode. Read/write.

RecordInterval

Vector of two doubles

Default: [0 0]

Start and stop times for scheduled animation recording. Corresponds to the virtual world object Time property. Read/write.

RemoteView

'off' | 'on'

Default: 'off'

Remote access flag. If the virtual world is enabled for remote viewing, it is set to 'on'; otherwise, it is set to 'off'. Read/write.

Rendering

'off' | 'on'

Default: 'on'

Render vrworld object in the Simulink 3D Animation Viewer, specifying 'on' or 'off'. Turning off rendering improves performance. For example, if your code does batch operations on a virtual world, you can turn off rendering during that processing and then turn it back on after the processing.

Time

Double

Current time in the virtual world. Read/write.

TimeSource

'external' | 'freerun'

Default: 'external'

Source of the time for the virtual world. If set to 'external', time in the scene is controlled from the MATLAB® interface (by setting the Time property) or the MATLAB interface (simulation time).

If set to 'freerun', time in the scene advances independently based on the system timer. Read/write.

View

'off' | 'on'

Default: 'on'

Indicates an unviewable or viewable virtual world. Read/write.

Viewpoints

Vector of vrnode objects

Vector of vrnode objects representing viewpoints defined in the virtual world. Read only.

The ClientUpdates property is set to 'on' by default and can be set by the user. When it is set to 'off', the viewers looking at this virtual world should not update the view according to the virtual world changes. That is, the view is frozen until this property is changed to 'on'. This is useful for preventing tearing effects with complex animations. Before every animation frame, set ClientUpdates to 'off', make the appropriate modifications to the object positions, and then switch ClientUpdates back to 'on'.

The Description property defaults to '(untitled)' and can be set by the user. If the virtual world is loaded from a virtual world 3D file containing a WorldInfo node with a title property, the Description property is loaded from the virtual world 3D file instead.

The Nodes property is valid only when the virtual world is open. If the virtual world is closed, Nodes always contains an empty vector.

The RemoteView property is set to 'off' by default and can be set by the user. If it is set to 'on', all viewers can access the virtual world through the Web interface. If it is set to 'off', only host viewers can access it.

The View property is set to 'on' by default and can be set by the user. When it is set to 'off', the virtual world is not accessible by the viewer. You rarely use this property.

Version History

Introduced before R2006a

collapse all

R2023b: To be removed

The vrworld/get 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.