[vtkusers] another question about vtkInteractorStyleTrackballActor
jeff at cdnorthamerica.com
Thu Oct 24 10:15:50 EDT 2002
Simon Chatelain wrote:
> Thanks to Jeff: i undestand how to set an interactor style.
> Buut i have now to questions more:
> first : what is exactly changed when using this interactor, the
> vtkActor or the vtkPolydata ?
> In fact i need to apply the same transformations on another
> mesh in an other frame,
> but i d'ont know how to get the transformation applied on
> the actor.
depending on the interactor style, either the camera is moved, or the
actor is moved. The underlying polydata is never modified.
> second : i have multiple actor in my vtkRenderWindow, but i want that
> only one can be modified by
> user. Typically i d'ont want that the user move the
> Actually, i check each time the mouse button is pressed
> if the actor under the mouse is or not
> the actor who can be moved and set the interactor style.
vtkInteractorStyleSwitch has both actor and camera modes - see the
documentation for a description of keypresses.
> here is the code :
> public void mousePressed(MouseEvent e)
> if (this.activeActor == this.parent.instrumentMeshActor)
> System.out.println("Instrument picked");
> // set the interactor style to trackballActor
> System.out.println("Other mesh picked");
> // set the interaction style to trackballCamera
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
More information about the vtkusers