[vtkusers] Propagate transformation from vtkActor to vtkPolydata

NsPx nspx.roronoa at gmail.com
Wed Dec 5 12:20:02 EST 2012


Hi all,

After moving a vtkActor, I want to propagate the transformation to its 
vtkPolydata.

My code :

vtkMatrix4x4* matrix = actor->GetMatrix();

vtkSmartPointer<vtkTransform> transform = 
vtkSmartPointer<vtkTransform>::New();
transform->SetMatrix( matrix );

vtkSmartPointer<vtkTransformPolyDataFilter> filter= 
vtkSmartPointer<vtkTransformPolyDataFilter>::New();
filter->SetTransform( transform);
filter->SetInput(polyData);
filter->Update();

polyData->DeepCopy( filter->GetOutput());

How can I prevent the actor from being updated again ?
I tried to apply the reverse matrix to the actor but I failed, I'm a 
little bit confused about which function I have to call, ( PokeMatrix() 
? Set/AddPosition() ? ... ).

Thanks by advance for helping me.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121205/0a861139/attachment.htm>


More information about the vtkusers mailing list