<div dir="ltr">Hi Torsten,<div><br></div><div>I suspect that there is a bug in the Identity() method that occurs when it is used after Inverse(), and I believe that this bug is invisible except for when Concatenate(vtkTransform *) is used. Sorry for the vague explanation... it will take me some time to investigate this further.</div><div><br></div><div> - David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:19 AM, Torsten Sadowski <span dir="ltr"><<a href="mailto:torsten.sadowski@windnovation.com" target="_blank">torsten.sadowski@windnovation.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi David,<br>
<br>
no, Update() does not change the result. I came across this issue
because I found the vtkTDxInteractorStyleCamera to be utterly
useless. The reason is that this snippet from
vtkTDxInteractorStyleCamera does nothing:<span class=""><br>
<br>
<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;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;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;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;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>
</span><pre style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">axisEye is identical to axisWorld. The vtkTDxInteractorStyleGeo has something similar.
There is either a bug in vtkTransform or in the InteractorStyles. I could make a bug report for either.
Cheers,
Torsten
</pre><div><div class="h5">
<br>
<div>Am 21.01.2016 um 18:04 schrieb David
Gobbi:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Torsten,
<div><br>
</div>
<div>I suspect that it will work if you do this:</div>
<div><br>
</div>
<div>
<div> this->Transform->Identity();</div>
<div>
this->Transform->Concatenate(eyeToWorld->GetMatrix());</div>
<div> this->Transform->Inverse();</div>
<div><br>
</div>
<div>The "Concatenate" method has two signatures with
different behavior:</div>
<div> Concatenate(vtkMatrix4x4 *)</div>
<div> Concatenate(vtkTransform *)</div>
<div><br>
</div>
<div>The second one establishes a connection between the two
transforms,</div>
<div>so if you do
"this->Transform->Concatenate(eyeToWorld)" then any</div>
<div>future changes to "eyeToWorld" will also cause
"this->Transform" to</div>
<div>change.</div>
<div><br>
</div>
<div>If you call "this->Transform->Update()" before
PrintSelf, is the correct</div>
<div>matrix printed? The TransformVector() method implicitly
calls Update().</div>
<div><br>
</div>
<div> - David </div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Jan 21, 2016 at 9:28 AM,
Torsten Sadowski <span dir="ltr"><<a href="mailto:torsten.sadowski@windnovation.com" target="_blank"></a><a href="mailto:torsten.sadowski@windnovation.com" target="_blank">torsten.sadowski@windnovation.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div 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:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkTDxInteractorStyleCamera</span><span style="color:rgb(0,0,0)">::</span><span style="font-style:italic;color:rgb(0,0,0)">OnMotionEvent<br>
<br>
</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Get</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">rotation</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">axis</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">in</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">world</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">coordinates.</span>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">Transform</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">Identity</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">Transform</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">Concatenate</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">eyeToWorld</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">Transform</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">Inverse</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">Transform</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">TransformVector</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">axisEye</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,0)">axisWorld</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin:0px;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:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Get</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">rotation</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">axis</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">in</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">world</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">coordinates.</span>
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">Transform</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">SetMatrix</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">eyeToWorld</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetMatrix</span><span style="color:rgb(0,0,0)">());</span>
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">Transform</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">Inverse</span><span style="color:rgb(0,0,0)">();</span>
<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">Transform</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">TransformVector</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">axisEye</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,0)">axisWorld</span><span style="color:rgb(0,0,0)">);</span>
I'm baffled.
Best Regards,
Torsten Sadowski
</pre>
<br>
<div>-- <br>
<img alt="" src="cid:part2.05050104.02020401@windnovation.com" height="64" width="186"><br>
<small><br>
</small>
<div>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: <a href="tel:%2B49%2030%20547195%2034" value="+493054719534" target="_blank">+49 30
547195 34</a><br>
Fax: <a href="tel:%2B49%2030%20547195%2039" value="+493054719539" target="_blank">+49 30
547195 39</a><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 href="http://www.windnovation.com" target="_blank">www.windnovation.com</a><br>
<small><br>
</small> Certified according to ISO 9001:2008</small></div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>