Virtual Reality Toolbox | ![]() ![]() |
Read values of Virtual Reality Toolbox preferences
Syntax
x = vrgetpref x = vrgetpref('preference_name
') x = vrgetpref('preference_name
','factory') x = vrgetpref('factory
')
Arguments
preference_name
|
Name of the preference to read. |
Description
x = vrgetpref
returns the values of all the Virtual Reality Toolbox preferences in a structure array.
x = vrgetpref('preference_name
') returns the value of the specified preference. If preference_name
is a cell array of preference names, a cell array of corresponding preference values is returned.
x = vrgetpref('preference_name
','factory')returns the default value for the specified preference.
x = vrgetpref('factory
') returns the default values for all the preferences.
The following preferences are defined.
Note that the HttpPort
, VrPort
, and TransportBuffer
preferences affect Web-based viewing of virtual worlds. DefaultFigurePosition
and DefaultPanelMode
affect the Virtual Reality Toolbox viewer.
DefaultPanelMode -- The DefaultPanelMode
preference controls the appearance of the control panel in the Virtual Reality Toolbox viewer. For example, setting this value to 'translucent
' causes the control panel to appear translucent.
DefaultViewer -- The DefaultViewer
preference determines whether the virtual scene appears in the Virtual Reality Toolbox viewer or in your Web browser. If the preference is set to 'internal
', the Virtual Reality Toolbox viewer is the default viewer. If it is set to 'web
', the default Web browser with the VRML plug-in is the default viewer.
Editor Preference -- The Editor
preference contains a path to the VRML editor executable file. When you use the edit
command, the Virtual Reality Toolbox runs the VRML editor executable with all parameters required to edit the VRML file.
When you run the editor, the Virtual Reality Toolbox uses the Editor
preference value as if you typed it into a command line. The following tokens are interpreted:
%matlabroot |
Refers to the MATLAB root directory |
%file |
Refers to the VRML file name |
For instance, a possible value for the Editor
preference is
Note the quotation marks around the executable filename and the VRML filename. If this preference is empty, the MATLAB editor is used.
HttpPort Preference -- The HttpPort
preference specifies the network port to be used for Web access. The port is given in the Web URL as follows:
The default value of this preference is 8123
.
Transport Buffer -- The TransportBuffer
preference defines the size of the message window for client-server communication. This value determines how many messages, at a maximum, can travel between the client and the server at one time.
Generally, higher values for this preference make the animation run more smoothly, but with longer reaction times. (More messages in the line create a buffer that compensates for the unbalanced delays of the network transfer.)
The default value is 5
, which is optimal for most purposes. You should change this value only if the animation is significantly distorted or the reaction times are very slow. On fast connections, where delays are introduced more by the client rendering speed, this value has very little effect. Viewing on a host computer is equivalent to an extremely fast connection. On slow connections, the correct value can improve the rendering speed significantly but, of course, the absolute maximum is determined by the maximum connection throughput.
VrPort Preference -- The VrPort
preference specifies the network port to use for communication between the Virtual Reality Toolbox server (host computer) and its clients (client computers). Normally, this communication is completely invisible to the user. However, if you view a virtual world from a client computer, you might need to configure the security network system (firewall) so that it allows connections on this port. The default value of this preference is 8124
.
See Also
![]() | vrdrawnow | vrinstall | ![]() |