| Virtual Reality Toolbox™ | ![]() |
vrsetpref('preference_name', 'preference_value')
vrsetpref('factory')
preference_name | Name of the preference. |
preference_value | New value of the preference. |
This function sets the given Virtual Reality Toolbox preference to a given value. The following preferences are defined. For preferences that begin with the string DefaultFigure or DefaultWorld, these values are the default values for the corresponding vrfigure or vrworld property:
| Preference | Description |
|---|---|
DataTypeBool | Specifies the handling of the VRML Bool data type for vrnode/setfield and vrnode/getfield. Valid values are 'logical' and 'char'. If set to 'logical', the VRML Bool data type is returned as a logical value. If set to 'char', the Bool data type is returned 'on' or 'off'. Default is 'logical'. |
DataTypeInt32 | Specifies handling of the VRML Int32 data type for vrnode/setfield and vrnode/getfield. Valid values are 'int32' and 'double'. If set to 'int32', the VRML Int32 data type is returned as int32. If set to 'double', the Int32 data type is returned as 'double'. Default is 'double'. |
DataTypeFloat | Specifies the handling of the VRML float data type for vrnode/setfield and vrnode/getfield. Valid values are 'single' and 'double'. If set to 'single', the VRML Float and Color data types are returned as 'single'. If set to 'double', the Float and Color data types are returned as 'double'. Default is 'double'. |
DefaultFigureAnti | Determines whether antialiasing is used by default for new vrfigure objects. Valid values are 'off' and 'on'. |
DefaultFigureDeleteFcn | Specifies the default callback invoked when closing a vrfigure object. |
DefaultFigureLighting | Specifies whether the lights are rendered by default for new vrfigure objects. Valid values are 'off' and 'on'. |
DefaultFigureMax | Specifies the default maximum size of a texture used in rendering new vrfigure objects. Valid values are 'auto' and 32 <= x <= video card limit, where x is a power of 2. |
DefaultFigureNavPanel | Specifies the default appearance of the control panel in the viewer. Valid values are 'opaque', 'translucent', 'none', 'halfbar', 'bar', and 'factory'. Default is 'halfbar'. |
DefaultFigureNavZones | Specifies whether the navigation zone is on or off by default for new vrfigure objects. Valid values are 'off' and 'on'. |
DefaultFigurePosition | Sets the default initial position and size of the Virtual Reality Toolbox viewer window. Valid value is a vector of four doubles. |
DefaultFigureRecord2D | Specifies the default compression method for creating 2-D animation files for new vrfigure objects. Valid values are '', 'auto', 'lossless', and 'codec_code'. |
DefaultFigureRecord2D | Specifies the default quality of 2-D animation file compression for new vrfigure objects. Valid values are 0-100. |
DefaultFigureRecord2D | Specifies the default 2-D offline animation filename for new vrfigure objects. |
DefaultFigureRecord2DFPS | Specifies the default frames per second playback speed. |
DefaultFigureStatusBar | Specifies whether the status bar appears by default at the bottom of the Virtual Reality Toolbox viewer for new vrfigure objects. Valid values are 'off' and 'on'. |
DefaultFigureToolBar | Specifies whether the toolbar appears by default on the Virtual Reality Toolbox viewer for new vrfigure objects. Valid values are 'off' and 'on'. |
DefaultFigure | Specifies whether or not transparency information is taken into account when rendering for new vrfigure objects. Valid values are 'off' and 'on'. |
DefaultFigureWireframe | Specifies whether objects are drawn as solids or wireframes by default for new vrfigure objects. Valid values are 'off' and 'on'. |
DefaultViewer | Specifies which viewer is used to view a virtual scene. The Virtual Reality Toolbox viewer is used when the preference is set to 'internal'. The Web browser is used when this preference is set to 'web'. Default is 'internal'. |
DefaultWorldRecord3D | Specifies the default 3-D animation filename for new vrworld objects. |
DefaultWorldRecordMode | Specifies the default animation recording mode for new vrworld objects. Valid values are 'manual' and 'scheduled'. |
DefaultWorldRecord | Specifies the default start and stop times for scheduled animation recording for new vrworld objects. Valid value is a vector of two doubles. |
DefaultWorldRemoteView | Specifies whether the virtual world is enabled by default for remote viewing for new vrworld objects. Valid values are 'off' and 'on'. |
DefaultWorldTimeSource | Specifies the default source of the time for new vrworld objects. Valid values are 'external' and 'freerun'. |
Editor | Path to the VRML editor. If this path is empty, the MATLAB editor is used. |
HttpPort | IP port number used to access the VR server over the Web via HTTP. If you change this preference, you must restart the MATLAB software before the change takes effect. |
TransportBuffer | Length of the transport buffer (network packet overlay) for communication between the VR server and its clients. |
TransportTimeout | Amount of time the VR Toolbox server waits for a reply from the client. If there is no response from the client, the VR Toolbox server disconnects from the client. |
VrPort | IP port used for communication between the VR server and its clients. If you change this preference, you must restart the MATLAB software before the change takes effect. |
Changes to the HttpPort or VrPort preferences take effect only after you restart the MATLAB software.
When you use 'factory' as a single argument, all preferences are reset to their default values. If you use 'factory' for a preference value, that single preference is reset to its default.
![]() | vrrotvec2mat | vrspacemouse | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |