<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">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:part1.01070907.00010800@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>