[vtkusers] vtkTransform::Concatenate followed by Inverse results in Identity (VTK 6.3.0)

David Gobbi david.gobbi at gmail.com
Thu Jan 21 12:04:04 EST 2016


Hi Torsten,

I suspect that it will work if you do this:

  this->Transform->Identity();
  this->Transform->Concatenate(eyeToWorld->GetMatrix());
  this->Transform->Inverse();

The "Concatenate" method has two signatures with different behavior:
  Concatenate(vtkMatrix4x4 *)
  Concatenate(vtkTransform *)

The second one establishes a connection between the two transforms,
so if you do "this->Transform->Concatenate(eyeToWorld)" then any
future changes to "eyeToWorld" will also cause "this->Transform" to
change.

If you call "this->Transform->Update()" before PrintSelf, is the correct
matrix printed?  The TransformVector() method implicitly calls Update().

 - David


On Thu, Jan 21, 2016 at 9:28 AM, Torsten Sadowski <
torsten.sadowski at windnovation.com> wrote:

> Hello,
>
> 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.
>
> This snippet from void vtkTDxInteractorStyleCamera::OnMotionEvent
>
> // Get the rotation axis in world coordinates.
>
>   this->Transform->Identity();
>
>   this->Transform->Concatenate(eyeToWorld);
>
>   this->Transform->Inverse();
>
>   this->Transform->TransformVector(axisEye,axisWorld);
>
> does nothing useful because the Transform returns the identity after Inverse (checked with PrintSelf).
> This on the other hand works:
>   // Get the rotation axis in world coordinates.  this->Transform->SetMatrix(eyeToWorld->GetMatrix());  this->Transform->Inverse();  this->Transform->TransformVector(axisEye,axisWorld);
>
> I'm baffled.
>
> Best Regards,
> Torsten Sadowski
>
>
> --
>
>
> Dr.-Ing. Torsten Sadowski
> Turbine Design/System Integration
>
> WINDnovation Engineering Solutions GmbH
> Stralauer Platz 33-34
> 10243 Berlin
> Germany
> Phone: +49 30 547195 34
> Fax:   +49 30 547195 39
> Managing directors:
> Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg
> Registered at Amtsgericht Charlottenburg, HRB 110081 B
>
> www.windnovation.com
>
> Certified according to ISO 9001:2008
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160121/4f358976/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WINDnovation_Logo_Email.jpg
Type: image/jpeg
Size: 80199 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160121/4f358976/attachment.jpg>


More information about the vtkusers mailing list