The device command sets modes for certain external devices, where the device-type can be:
The status of a mode can be on (synonyms true, True, 1) or off (synonyms false, False, 0). Device-specific options are described below.• device snav [ status ] [ fly true | false ] [ speed factor ]
• vr [ status ] [ roomPosition matrix | report ] [ mirror true | false ] [ icons true | false ] [ showControllers true | false ]
The command device snav enables manipulation with a SpaceNavigator® 3D mouse from 3Dconnexion. The fly option indicates whether the force applied to the device should be interpreted as acting on the camera (true), where pushing forward zooms in because it moves the camera viewpoint toward the scene, or as acting on the models in the scene (false, default), where pushing forward zooms out because it pushes the models away. In either case, however, it is the camera that actually moves. The speed option sets a sensitivity factor for motion relative to the device (default 1.0). Decreasing the value (for example, to 0.1) reduces sensitivity to give slower motion, whereas increasing the value has the opposite effect. See also: mousemode
The vr command (same as device vr) enables a virtual reality mode for HTC Vive and Oculus Rift systems. The mode uses SteamVR, which must be installed separately by the user and started before the mode is enabled. In addition, Oculus Rift users should start the Oculus runtime before starting SteamVR. For details and related issues, see ChimeraX virtual reality. See also: camera, view, making movies
When the mode is enabled, the roomPosition option can be used to specify the transformation between room coordinates (in meters, with origin at room center) and scene coordinates (typically in Å) or to simply report the current transformation in the Log. The transformation matrix is given as 12 numbers separated by commas only, corresponding to a 3x3 matrix for rotation and scaling, with a translation vector in the fourth column. Ordering is row-by-row, such that the translation vector is given as the fourth, eighth, and twelfth numbers. Example:vr room 20,0,0,0,0,20,0,0,0,0,20,0
The mirror option (default false) indicates whether to update the ChimeraX graphics window. Updating the graphics window will usually cause stuttering in the VR headset because refreshing the computer display (nominally 60 times per second) slows rendering to headset. Although it may be possible to avoid this problem by turning off syncing to vertical refresh, it is better to use the SteamVR display mirror window.
The icons option (default false) indicates whether to show a panel of icons when the controller trackpad is touched. For demonstrations, the icons can be too complex and may be better left unshown.
The showControllers option (default true) shows representations of the hand controllers in the scene. Not showing the representations may be useful to avoid time-consuming calculations of the shadows they cast.