[vtkusers] Apply one transformation matrix to an other actor

David Cole DLRdave at aol.com
Thu Nov 12 08:19:25 EST 2015


Try GetMatrix / SetUserMatrix. If the destination actor has any position,
rotation or scaling directly, you'll have to reset those to 0 or 1
appropriately. If not, the destination actor should snap to the source
actor after calling SetUserMatrix.


On Thursday, November 12, 2015, Lonni Besançon <lonni.besancon at gmail.com>
wrote:

> Hello,
>
> I was wondering if there was a way to extract the transformation matrix of
> an actor and apply it to an other actor.
> The scenario would be something like that: I have an actor with a given
> orientation/position/scaling, that I would like to apply to an other actor
> so that it gets in the exact same orientation/position/scaling. This could
> be use for instance to swap two actors or to mirror on different
> applications the different actions made on one of the applications.
>
> So far I have tried to play with GetUserMatrix() and SetUserMatrix(), but
> the problem is that most of the time this matrix is NULL. So I have tried
> to
> use the GetMatrix() to get the matrix of the first actor but I was
> wondering
> how I could now apply it to an other one.
>
> I've tried to read the documentation but I was unsuccessful in finding the
> exact information I'm looking for.
>
> Have a nice day and thanks in advance for the help
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Apply-one-transformation-matrix-to-an-other-actor-tp5734919.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151112/821a776a/attachment.html>


More information about the vtkusers mailing list