File Exchange

image thumbnail

3D mouse support

version 1.0.0.0 (2.75 KB) by Gus Brown
Allows the use of a 3D mouse to rotate ones figures.

5 Downloads

Updated 03 Mar 2008

View License

Mathworks really should support the 3D mouse by default, but until they do I created a simple hack to allow one to use a 3D mouse to rotate a figure.

The function connects to the mouse driver COM object and uses a timer function to poll the mouse position and rotation. To prevent excessive resource use the time step is increased when the mouse is not in use.

Some more work is needed, but hopefully this will inspire Mathworks to include support for a 3D mouse in the next release.

Visit http://www.3dconnexion.com/ to find out what a 3D mouse is.

Cite As

Gus Brown (2020). 3D mouse support (https://www.mathworks.com/matlabcentral/fileexchange/18266-3d-mouse-support), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Peter

I can't get this to work with axes that are inside a GUI, any ideas? It will only manipulate other figures that are not part of GUIs.

Fereshteh Aalamifar

Ben

This is great! It would be even better if it rotated the object rather than the camera. I may play with that.

Gus Brown

I doub't its a problem with Matlab, but a problem with the 3Dmouse divers.
I guess you don't have the same 3DConnexion mouse drivers that I have. Or maybe you dont have them installed.

Vihang Patil

I get this error message
??? Error using ==> actxserver at 91
Server creation failed. Invalid ProgID 'TDxInput.Device'

Error in ==> Mouse3D>mouse3D_start at 170
srv = actxserver('TDxInput.Device');

Error in ==> Mouse3D at 104
[srv,tim] = mouse3D_start(period,timertag);

Do we need any specific toolbox for it? I am using R2007b

Jerome Hoepffner

Hello, thank you very much for this function. I newly became a happy owner of the 3Dmouse, but I have a MacIntosh, thus the COM as well as serial I/O are not supported for me ;-(. Do you know how I could proceed? I don't know much about these...

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!