[vtkusers] Disabling rotation

Eric E. Monson emonson at cs.duke.edu
Thu Nov 4 09:47:45 EDT 2010


Hey Robbie,

You just need to set the interactor style to vtkInteractorStyleImage:

http://www.vtk.org/doc/nightly/html/classvtkInteractorStyleImage.html

You can see the examples and tests linked from that page, but it will be something like:

vtkSmartPointer<vtkInteractorStyleImage> imageStyle =
    vtkSmartPointer<vtkInteractorStyleImage>::New();
widget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(imageStyle);

-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Nov 3, 2010, at 4:53 PM, Robbie Banks wrote:

> Hello all,
> 
> Was wondering if there was a way to disabling rotation within the viewing
> window.
> 
> I am using a QVTKWidget to display 2D and 3D data. However, when I display
> 2D data I would prefer that the grabbing the object with the left mouse
> button would not allow the user to rotate the object around the origin, so
> that the display stays with the plane normal to the viewer.
> 
> This seems to be the way the interactors work for image data. Is there a
> simple flag to prevent actor rotation about the origin in the z-plane?
> 
> Thanks in advance
> Robbie
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list