[vtkusers] vtkPoints modification in the method Execute for a CallBack Process

Mériadeg Perrinel meriadegp at yahoo.fr
Tue Jan 18 08:36:57 EST 2011


Hi,



Thanks for the answer.

In fact, after actor, I used the vtkTransformPolyDataFilter. And if at 
the screen, I still have my object moving as with the widget. When I 
draw my vtkPoints, the coordonates don'ts change.



My connection is like that :

vtkTransformPolyDataFilter->SetInput(vtkPolyData);

vtkTubeFilter->SetInput(vtkTransformPolyDataFilter->GetOutput());



I forgot to say between the vtkPolyData and the vtkPolyDataMapper, I 
connect a vtkTubeFilter (for the representation of my lines).



And maybe that could be helpful to know when I see my coordonates :



In the Execute method, I create a vtkPoints that is initialized outside 
of the method by the vtkPoints that I put into the vtkPolyData.

And before the transform and after it I read the vtkPoints to see if the coordonates is changed but it's still not.



Another answer ??





--- En date de : Mar 18.1.11, David Doria <daviddoria at gmail.com> a écrit :

De: David Doria <daviddoria at gmail.com>
Objet: Re: [vtkusers] vtkPoints modification in the method Execute for a CallBack Process
À: "youpie" <meriadegp at yahoo.fr>
Cc: vtkusers at vtk.org
Date: Mardi 18 janvier 2011, 13h24

n Tue, Jan 18, 2011 at 5:39 AM, youpie <meriadegp at yahoo.fr> wrote:



Hi,



I'm using a CallBack Procedure with Execute Method to associate event of my

widgetBox with my vtkPoints.

In fact when i use a vtkTransform obtained with widgetBox->getTransform

(vtkTrasnform) and after use it on the actor associated to the widget, My

actor move exaclty as I want when I move the widget.

But if I draw my vtkPoints I can see that points don't have changed. So How

can that be possible if my actor is moving ?

And if I use the vtkTransfor of the widget box to change directly the

coordonates of my points of vtkPoints, (whithout use the setUserTransform

method of my actor). I can see coordinates changing, but nothing appened on

the screen.

Please see the "Transforms" slide set here: http://www.vtk.org/Wiki/VTK/Presentations

By
 transforming the actor, you are just telling OpenGL to move the object,
 not changing the actual coordinates that you can access (i.e. your 
vtkPoints, as you've noticed).


David



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110118/9692c739/attachment.htm>


More information about the vtkusers mailing list