[vtkusers] another question about vtkInteractorStyleTrackballActor
Jeff Lee
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
> axesActor.
> 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)
> {
> super.mousePressed(e);
> this.pickActor(e.getX(),e.getY());
> if (this.activeActor == this.parent.instrumentMeshActor)
> {
> System.out.println("Instrument picked");
> // set the interactor style to trackballActor
> iren.SetInteractorStyle(ista);
> }
> else
> {
> System.out.println("Other mesh picked");
> // set the interaction style to trackballCamera
> iren.SetInteractorStyle(istc);
> }
> }
>
> _______________________________________________
> 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:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list