MantisBT - VTK
View Issue Details
0009837VTK(No Category)public2009-11-04 08:182013-04-05 19:57
U. Mennel 
François Bertel 
normalmajoralways
closedfixed 
 
 
0009837: transformation in vtkTDxInteractorStyleCamera is wrong
vtkTDxInteractorStyleCamera, which comes with the 3d connexion device support, applies a counter-intuitive transformation. The default concatenation state is premultiply, so the rotation should be: translate(p); rotate; translate(-p); where p is the camera focal point. In addition, the whole transform should be inverted before applying to the camera to yield a more intuitive behavior. And, a little off topic, why the vtkTDxInteractorStyle is not derived from vtkInteractorObserver and reuses the mechanisms already provided there?
Appart from these issues the 3d connexion device is working greatly together with VTK!
No tags attached.
Issue History
2009-11-04 08:18U. MennelNew Issue
2009-11-05 11:56François BertelStatusbacklog => tabled
2009-11-05 11:56François BertelAssigned To => François Bertel
2009-11-05 12:23François BertelNote Added: 0018346
2009-11-05 12:23François BertelStatustabled => @80@
2009-11-05 12:23François BertelResolutionopen => fixed
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2013-04-05 19:57Berk GeveciStatuscustomer review => closed

Notes
(0018346)
François Bertel   
2009-11-05 12:23   
Fixed in rev 1.2 of vtkTDxInteractorStyleCamera.cxx (2009/11/05). Thanks for reporting the wrong order. The pre/post terms are really confusing, vtkTransform should talk about right/left matrix multiplication instead...


About the other questions:

vtkTDxInteractorStyleCamera is intended to move the camera, not the object.
I don't find it counter-intuitive. It follows the values return by the devices.
For example, the coordinate system on the space navigator matches the OpenGL
coordinate system: X axis goes from left to right, Y axis from bottom to top and Z axis from back to front.

For example, if you push to the right, you have a positive translation along the X axis, the camera move to the right, therefore the world move to the left. If you tilt to the left, you have a positive rotation around the Z axis for the camera, so the world tilt to the right.


You can always write another vtkTDxInteractorStyleCamera that match your taste better or play with the values on the vtkTDxInteractorStyleSettings object (for example, changing the sign of the sensitivity parameters will reverse the axes). Or write a vtkTDxInteractorStyleActor. There is no canonical solution or style.

The 3DConnexion GUI also allows you to reverse the axes or to switch axes meaning (like selecting with one will affect the translation along the Z-axis (they call that the zoom on the GUI even if it is not the correct term to use) )


vtkTDxInteractorStyle is not derived from vtkInteractorObserver because vtkInteractorObserver is tied to keyboard/mouse interaction (see methods like OnChar(), or GrabFocus() that don't make sense with a 3DConnexion device)