Revision: 37878
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37878
Author:   merwin
Date:     2011-06-27 20:44:23 +0000 (Mon, 27 Jun 2011)
Log Message:
-----------
Mac ndof using blender view coordinates + small but important typo fixed

Modified Paths:
--------------
    branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
    branches/merwin-spacenav/source/blender/editors/space_view3d/view3d_edit.c

Modified: branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
===================================================================
--- branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm      
2011-06-27 20:36:08 UTC (rev 37877)
+++ branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm      
2011-06-27 20:44:23 UTC (rev 37878)
@@ -73,11 +73,14 @@
                        switch (s->command)
                                {
                                case kConnexionCmdHandleAxis:
-                                       
ndof_manager->updateTranslation(s->axis, now);
-                                       ndof_manager->updateRotation(s->axis + 
3, now);
+                                       {
+                                       short t[3] = {s->axis[0], 
-(s->axis[2]), s->axis[1]};
+                                       short r[3] = {-(s->axis[3]), 
s->axis[5], -(s->axis[4])};
+                                       ndof_manager->updateTranslation(t, now);
+                                       ndof_manager->updateRotation(r, now);
                                        
ghost_system->notifyExternalEventProcessed();
                                        break;
-
+                                       }
                                case kConnexionCmdHandleButtons:
                                        {
                                        int button_bits = has_old_driver ? 
s->buttons8 : s->buttons;

Modified: 
branches/merwin-spacenav/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- branches/merwin-spacenav/source/blender/editors/space_view3d/view3d_edit.c  
2011-06-27 20:36:08 UTC (rev 37877)
+++ branches/merwin-spacenav/source/blender/editors/space_view3d/view3d_edit.c  
2011-06-27 20:44:23 UTC (rev 37878)
@@ -997,11 +997,11 @@
                ndof->dt = dt = 0.0125f;
 
 
-       if (ndof->ty) {
+       if (ndof->tz) {
                // Zoom!
                // velocity should be proportional to the linear velocity 
attained by rotational motion of same strength
                // [got that?]
-               // proportional to s = r * theta
+               // proportional to arclength = radius * angle
 
                float zoom_distance = zoom_sensitivity * rv3d->dist * dt * 
ndof->tz;
                rv3d->dist += zoom_distance;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to