<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I am trying to design my own vtkTDxInteractorStyle. When I looked
into vtkTDxInteractorStyleCamera as an example I found something
puzzling which might be a bug in either vtkTransform or
vtkTDxInteractorStyleCamera.<br>
<br>
This snippet from <span style=" color:#808000;">void</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#800080;">vtkTDxInteractorStyleCamera</span><span
style=" color:#000000;">::</span><span style=" font-style:italic;
color:#000000;">OnMotionEvent<br>
<br>
</span><span style=" color:#c0c0c0;"> </span><span style="
color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#008000;">Get</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#008000;">the</span><span style=" color:#c0c0c0;"> </span><span
style=" color:#008000;">rotation</span><span style="
color:#c0c0c0;"> </span><span style=" color:#008000;">axis</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#008000;">in</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#008000;">world</span><span
style=" color:#c0c0c0;"> </span><span style=" color:#008000;">coordinates.</span>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">Transform</span><span style=" color:#000000;">-></span><span style=" color:#000000;">Identity</span><span style=" color:#000000;">();</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">Transform</span><span style=" color:#000000;">-></span><span style=" color:#000000;">Concatenate</span><span style=" color:#000000;">(</span><span style=" color:#000000;">eyeToWorld</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">Transform</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">Inverse</span><span style=" color:#000000;">();</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">Transform</span><span style=" color:#000000;">-></span><span style=" color:#000000;">TransformVector</span><span style=" color:#000000;">(</span><span style=" color:#000000;">axisEye</span><span style=" color:#000000;">,</span><span style=" color:#000000;">axisWorld</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
does nothing useful because the Transform returns the identity after Inverse (checked with PrintSelf).
This on the other hand works:
<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">Get</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">the</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">rotation</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">axis</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">in</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">world</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">coordinates.</span>
<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">Transform</span><span style=" color:#000000;">-></span><span style=" color:#000000;">SetMatrix</span><span style=" color:#000000;">(</span><span style=" color:#000000;">eyeToWorld</span><span style=" color:#000000;">-></span><span style=" color:#000000;">GetMatrix</span><span style=" color:#000000;">());</span>
<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">Transform</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">Inverse</span><span style=" color:#000000;">();</span>
<span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span style=" color:#000000;">-></span><span style=" color:#800000;">Transform</span><span style=" color:#000000;">-></span><span style=" color:#000000;">TransformVector</span><span style=" color:#000000;">(</span><span style=" color:#000000;">axisEye</span><span style=" color:#000000;">,</span><span style=" color:#000000;">axisWorld</span><span style=" color:#000000;">);</span>
I'm baffled.
Best Regards,
Torsten Sadowski
</pre>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>
<!-- <div class="moz-signature"> Visit us at EWEA 2015 @ Stand S11<br><br></div>
<img alt="EWEA 2015" src="file:///r:/8_Vertrieb-Marketing-Messen/83200_Ausrichtung von Messen/83415_2015_EWEA_Paris/ewea2015_Messe_Logo.jpg" height="91" width="186">
<br><br><br> --> <img alt=""
src="cid:part1.01070907.00010800@windnovation.com" height="64"
width="186"><br>
<small><br>
</small>
<div class="moz-signature">Dr.-Ing. Torsten Sadowski<br>
Turbine Design/System Integration<br>
<br>
<small> WINDnovation Engineering Solutions GmbH<br>
Stralauer Platz 33-34<br>
10243 Berlin<br>
Germany<br>
Phone: +49 30 547195 34<br>
Fax: +49 30 547195 39<br>
Managing directors: <br>
Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg<br>
Registered at Amtsgericht Charlottenburg, HRB 110081 B<br>
<small><br>
</small> <a class="moz-txt-link-abbreviated" href="http://www.windnovation.com">www.windnovation.com</a><br>
<small><br>
</small> Certified according to ISO 9001:2008</small>
<div class="moz-signature"><br>
</div>
</div>
</div>
</body>
</html>