Code covered by the BSD License  

Highlights from
3D mouse support

5.0

5.0 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 2.75 KB File ID: #18266
image thumbnail

3D mouse support

by Gus Brown

 

09 Jan 2008 (Updated 03 Mar 2008)

Allows the use of a 3D mouse to rotate ones figures.

| Watch this File

File Information
Description

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.

Acknowledgements
This submission has inspired the following:
3D mouse support using classes and events
MATLAB release MATLAB 7.5 (R2007b)
Other requirements An installed and working 3D mouse.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
15 Jan 2008 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...

29 Jan 2008 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

30 Jan 2008 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.

21 Apr 2009 Ben

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

Please login to add a comment or rating.
Updates
09 Jan 2008

May not support Magellan as it is a different product.

09 Jan 2008

Rotation was not progressive.

10 Jan 2008

Just some code cleanup.

11 Jan 2008

Moved camva call, to prevent an empty figure window from poping up when there are no figures, unless the 3D mouse is moved.

03 Mar 2008

Changed wording.

Tag Activity for this File
Tag Applied By Date/Time
data exploration Gus Brown 22 Oct 2008 09:42:21
3dconnexion Gus Brown 22 Oct 2008 09:42:21
magellan Gus Brown 22 Oct 2008 09:42:21
graphics Gus Brown 22 Oct 2008 09:42:21
spacenavigator Gus Brown 22 Oct 2008 09:42:21
3dconnexion victor Torres 21 Sep 2010 21:00:37

Contact us at files@mathworks.com