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

David Gobbi david.gobbi at gmail.com
Fri Jan 22 11:17:46 EST 2016


Hi Torsten,

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.

 - David

On Fri, Jan 22, 2016 at 2:19 AM, Torsten Sadowski <
torsten.sadowski at windnovation.com> wrote:

> 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:
>
> // Get the rotation axis in world coordinates.
>
>   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>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 <%2B49%2030%20547195%2034>
>> Fax:   +49 30 547195 39 <%2B49%2030%20547195%2039>
>> 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/20160122/457f4a12/attachment-0001.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/457f4a12/attachment-0001.jpe>


More information about the vtkusers mailing list