[vtkusers] vtkTransform::Concatenate followed by Inverse results in Identity (VTK 6.3.0)
Torsten Sadowski
torsten.sadowski at windnovation.com
Fri Jan 22 04:19:29 EST 2016
Hi David,
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:
//Gettherotationaxisinworldcoordinates.
this->Transform->Identity();
this->Transform->Concatenate(eyeToWorld);
this->Transform->Inverse();
this->Transform->TransformVector(axisEye,axisWorld);
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
Am 21.01.2016 um 18:04 schrieb David Gobbi:
> 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
> <mailto: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 voidvtkTDxInteractorStyleCamera::OnMotionEvent
>
> //Gettherotationaxisinworldcoordinates.
>
> 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:
>
> //Gettherotationaxisinworldcoordinates.
> 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 <tel:%2B49%2030%20547195%2034>
> Fax: +49 30 547195 39 <tel:%2B49%2030%20547195%2039>
> Managing directors:
> Dr.-Ing. Roland Stoer, Dipl.-Ing. Albrecht Kantelberg
> Registered at Amtsgericht Charlottenburg, HRB 110081 B
>
> www.windnovation.com <http://www.windnovation.com>
>
> Certified according to ISO 9001:2008
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160122/d7c9cc87/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 80199 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160122/d7c9cc87/attachment.jpe>
More information about the vtkusers
mailing list