BUG: Fix Computation of Interaction Transform Used in PositionProp | ⚠️ Changes removed from master#139
Conversation
This commit fixes the incorrect and unnecessary conversion from axis-angle to quaternion inadvertently introduced in 503ef1d ("ENH: Add VR interactor style class for transforming objects in MRML", 2018-08-31). The additional conversion, introduced in the mentioned commit, was redundant since the event orientations (internally set using `vtkVRRenderWindowInteractor::ConvertPoseToWorldCoordinates`, itself introduced in Kitware/VTK@803d3a327d, "ENH: Use pose matrices instead of camera parameters for VR controllers", 2018-09-25) are already in quaternion format. The redundant conversion was leading to an invalid transformation of the selected object. Reported-by: Lucas Gandel <lucas.gandel@kitware.com> Co-authored-by: David Allemang <david.allemang@kitware.com>
f5cd99d to
3161d34
Compare
|
I may have missing something as inspecting code like the one in vtkEventDataDevice3D* edd = static_cast<vtkEventDataDevice3D*>(ed);
const double* wori = edd->GetWorldOrientation();
// move HMD world in the direction of the controller
vtkQuaternion<double> q1;
q1.SetRotationAngleAndAxis(vtkMath::RadiansFromDegrees(wori[0]), wori[1], wori[2], wori[3]);I am re-evaluating and I will likely force push to revert, and create a following-up topic. |
AnalysisDuring my initial review of the code associated with
However, upon further consideration, I realized that the orientation is effectively2 converted to an cc: @allemangD Footnotes |
master


masterby force pushing. Corresponding changes are superseded by #141Rational:
master#139 (comment)This commit fixes the incorrect and unnecessary conversion from axis-angle to quaternion inadvertently introduced in 503ef1d ("ENH: Add VR interactor style class for transforming objects in MRML", 2018-08-31).
The additional conversion, introduced in the mentioned commit, was redundant since the event orientations (internally set using
vtkVRRenderWindowInteractor::ConvertPoseToWorldCoordinates, itself introduced in Kitware/VTK@803d3a327d, "ENH: Use pose matrices instead of camera parameters for VR controllers", 2018-09-25) are already in quaternion format.The redundant conversion was leading to an invalid transformation of the selected object.
Reported by @LucasGandel and @sankhesh