Setting Trackballmode

Hank Childs childs at forum.llnl.gov
Wed May 24 23:01:18 EDT 2000


On Wed, 24 May 2000, Totte Karlsson wrote:

> Hi, in vtk 2 I  used code like
> 
> RenderWindow->GetInteractor()->SetTrackballModeToTrackball();
> 
> to set the interactor style to trackball. I updated to vtk3.1 and there is 
> now a class for the interactor style? Is it still possible to change it to 
> Trackball behaviour in a simple way?
> I dont want to have to press 't' while rendering..
> thanks
> 

Hello Totte,

Interactors are now changed by setting the interactor style of a render
window interactor.  One of the interactors styles is a trackball
(vtkInteractorStyleTrackball) and it has the method you want.


Something like this will do it:
vtkInteractorStyleTrackball *tball = vtkInteractorStyleTrackball::New();
tball->SetTrackballModeToTrackball();
RenderWindow->GetInteractor()->SetInteractorStyle(tball);

Good luck,
Hank Childs

____________________________________________________________________________

Hank Childs
MeshTV
Lawrence Livermore National Laboratory


--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list