(To be removed) Create space mouse object
vrspacemouse will be removed in a future release. For more
information, see Version History.
mouse = vrspacemouse(id)
mouse = vrspacemouse(id) creates a space mouse object capable of
interfacing with a space mouse input device. The
id parameter is a string
that specifies the space mouse connection:
vrspacemouse object has several properties that influence the
behavior of the space mouse input device. The properties can be read or modified using dot
mouse.DominantMode = true;).
Valid properties are (property names are case-sensitive):
|Mouse sensitivity for translations. Higher values correspond to higher sensitivity.
|Mouse sensitivity for rotations. Higher values correspond to higher sensitivity.
|Fixes the rotations at initial values, allowing you to change positions only.
|Fixes the positions at the initial values, allowing you to change rotations only.
|If this property is true, the mouse accepts only the prevailing movement and rotation and ignores the others. This mode is very useful for beginners using a space mouse.
|Position coordinates for the upper limit of the mouse.
|Enables mouse position limits. If false, the object ignores the
|Position coordinates for the lower limit of the mouse.
|Determines whether the integrated rotation angles should wrap on a full circle
(360°). This is not used when you read the
Output Type as
|Initial condition for integrated translations. This is not used when you set
Output Type to
|Initial condition for integrated rotations. This is not used when you set the
Output Type to
b = button(mouse, n) reads the status of space mouse button
n. Button status is returned as logical 0 if not pressed
and logical 1 if pressed.
n can be a vector to return multiple
close(mouse) closes and invalidates the space mouse object.
The object cannot be used once it is closed.
p = position(mouse, n) reads the position of space mouse
n can be a vector to return
positions of multiple axes. Translations and rotations are integrated. Outputs are
the position and orientation in the form of roll/pitch/yaw angles.
s = speed(mouse, n) reads the speed of space mouse axis
n can be a vector to return the
speeds of multiple axes. No transformations are done. Outputs are the translation
and rotation speeds.
p = viewpoint(mouse) reads the space mouse coordinates in
virtual world viewpoint format. Translations and rotations are integrated. Outputs
are the position and orientation in the form of an axis and an angle. You can use
these values as viewpoint coordinates in virtual world.
Version HistoryIntroduced in R2007b
R2023b: To be removed
vrspacemouse function will be removed in a future release.
sim3d classes and Simulation 3D blocks in Unreal Engine Scenario Applications to interface
MATLAB® and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Get Started Creating Virtual World with Actors.