[vtkusers] Rotate axis with vtkInteractorStyleTrackballActor

Gishara Indeewarie gish.777 at gmail.com
Wed Apr 25 07:50:10 EDT 2012


Hi all,

I wanted to decrease the rotation speed of my vtk window, hence I changed
the code as below.

vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
 vtkSmartPointer<vtkInteractorStyleTrackballActor> style =
      vtkSmartPointer<vtkInteractorStyleTrackballActor>::New();
iren->SetInteractorStyle(style);

This worked well, but it allows rotating objects separately, hence the axes
is not rotating according to the object.
Please help me on how to allow rotating of the axes. Thanks in advance.
Below is how I set the axes.

 vtkAxesActor *axes = vtkAxesActor::New();
vtkOrientationMarkerWidget *widget = vtkOrientationMarkerWidget::New();
widget->SetOrientationMarker(axes);
widget->SetInteractor(iren);
widget->SetEnabled(1);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120425/f43986f5/attachment.htm>


More information about the vtkusers mailing list