[vtkusers] multiple transforms

Bill Lorensen bill.lorensen at gmail.com
Tue Mar 2 14:55:08 EST 2010


You can concatenate transforms with vtkTransform. Once you have the
final transform, you can set it on the actor with SetUserTransform.

On Tue, Mar 2, 2010 at 8:24 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Tue, Mar 2, 2010 at 8:06 AM, Giancarlo Amati <ilferraresebono at hotmail.it>
> wrote:
>>
>> Hello vtkurs
>>
>> this is my question:
>>
>> let say that i have a sequence of transformation matrices 4x4, let's say
>> A, B, C. And I have an actor.
>> I use the SetUserTransform in this way:
>>
>> act->SetUserTransform(A);
>> act->SetUserTransform(B);
>> act->SetUserTransform(C);
>>
>> now, my questions are:
>>
>> 1) the resulting position of the actor is it resulting from the multiply
>> of A * B * C?
>> 2) the position of the actor is it the last applied?
>> 3) if I want to retrieve the connected dataset, is it a transformed
>> dataset or the original one?
>>
>>
>> Many thanks!
>> Giancarlo
>>
>
> Hi Giancarlo,
> It is possible to answer some of these things by looking at the source code.
> I will describe the process below:
> 1)
> By going to the list of classes:
> http://www.vtk.org/doc/nightly/html/classes.html
> then clicking on vtkActor:
> http://www.vtk.org/doc/nightly/html/classvtkActor.html
> I noticed that there is no SetUserTransform listed as a function. Therefore,
> it must be a function of a super class. To see ALL functions that can be
> called on a vtkActor, you can click "List of all members" (half way down the
> page).
> The SetUserTransform function is then found, and it belongs to vtkProp3D. I
> opened Rendering/vtkProp3D.cxx and found SetUserTransform. It looks like it
> doesn't do any multiplying, rather, it simply sets the current transform to
> the transform that you pass it.
> 2) Yes, The position of the actor should be the position it is currently in.
> 3) When you retrieve the connected data set, it is NOT transformed (it is
> indeed the original). This is the process when you transform the actor. If
> you want to transform the actual data set, you should use
> vtkTransformFilter.
> Hope that helps,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list