[vtkusers] another question about vtkInteractorStyleTrackballActor
Simon Chatelain
simon.chatelain at epfl.ch
Thu Oct 24 09:24:44 EDT 2002
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.
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.
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);
}
}
More information about the vtkusers
mailing list