[Bf-committers] 6DOF devices branch -state of affairs

Jean-Luc Peurière jlp at nerim.net
Tue Jun 12 22:32:00 CEST 2007


I committed working code (crudely)  for Os X on the branch :

you will need the plug-in code too. As we cannot host it in svn, you  
will find it here : http://jlp.nerim.net/dev/6dof/3Dcnxplug-mac.c

the plug-in goes in the following folder : $ROOT/intern/ghost/intern/ 
3dcnx/

For weak linking to work you need to define the following variable in  
shell and export it : MACOSX_DEPLOYMENT_TARGET=10.3

compile from $ROOT with :
cc -flat_namespace -bundle -bundle_loader ../build/darwin/bin/ 
blender.app/Contents/MacOS/blender intern/ghost/intern/3dcnx/*.c -I/ 
library/Frameworks/3DconnexionClient.framework/Headers - 
weak_framework 3DconnexionClient  -lc -fpascal-strings -o spaceplug.plug


There is some fundamental changes from the original patch.

First, polling is gone and we use system events to signal blender new  
values are available for NDOF.
the plug-in write values to a memory place furnished at init by main  
code. (this could be packaged in the system event, but works ok like  
that)

This has 2 advantages, the plug-in use no more a callback which could  
be seen as linking, and blend nicely with how other events are handled.
The API is so down to 3 functions. It is compatible also with how i  
plan to do HID.

As the device returns ints values (as will any HID device), we use  
that in GHOST instead  of floats.
Floats are still used in ghostwinlay.c

I hope we will be able to do the same on windows and linux, it is  
imho much better than polling.


Only non-camera 3Dview transform works now.

We will now have to define the features we want for this device :

* Only view and cameras, or also objects transforms ?
* if the latter, how we link with manipulators (same functionality) ?
* which centering modes make sense ?
* Dominant modes, translation, rotations only ?
* Can we find meaningful uses for the 2D views ?
* settings go in preferences or in a button pane (i would prefer the  
latter) ?

-- 
lukep


More information about the Bf-committers mailing list