[vtkusers] What is the correct way of updating an actor with changes applied to SetUserTransform?
Victor Nyberg
victorpereriknyberg at gmail.com
Sun Sep 25 08:53:29 EDT 2016
Hi,
First of all I would like to apologise in advance if this question is
too simple for bothering you with via the mailing list but I have not
been able to figure it out after quite some investigation.
I have a poly actor which has a vtkBoxWidget that is connected to a
callback as from the example in the docs:
|def widget_callback(obj, event): t = vtk.vtkTransform()
obj.GetTransform(t) obj.GetProp3D().SetUserTransform(t) |
All works fine and I am able to move and transform the actor with the
widget but the transformation is applied to the UserTransform and not
processed down to the actor properties.
So if I call:
|actor.GetPosition() |
It returns the initial position prior to making the changes with the
widget. And if I call:
|actor.GetUserTransform().GetPosition() |
I get the updated position relative to the starting point of the first
interaction.
Do I have to connect it all through a vtkTransformPolyDataFilter and
then update the input connection to the mapper and also calculate the
coordinate space offset or is there a simpler way of doing it? ... in short:
*What is the correct way of updating an actor with changes applied to
SetUserTransform?*
Many thanks in advance.
/Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160925/9912847f/attachment.html>
More information about the vtkusers
mailing list