[vtkusers] vtkInteractor to only rotate on one axis?
David Gobbi
dgobbi at irus.rri.ca
Mon Jun 18 18:30:16 EDT 2001
Hi Philip,
Try customizing vtkRenderWidget.py instead, it should be much easier.
Use the tk 'after' to drive animations. The vtkInteractorStyleUser is
an ugly beast (though CustomInteraction.py works fine for me, the mouse
buttons rotate & zoom & move the plane).
- David
On Mon, 18 Jun 2001, Phlip wrote:
> VTK Users:
>
> Using VTK 3.2 via Python on Linux.
>
> I want a window that visualizes a 3d shape and just rotates it around a
> vertical axis.
>
> I'd like to let it rotate automatically without user interaction.
>
> Approaching this, I'd settle for the user clicks on it and
> vtkRenderWindowIterator spins it around.
>
> However, this Interactor wobbles the viewed item around any axis.
>
> So I Google for this problem, and learn that vtkInteractorStyleUser has
> been invented to let one customize the viewer interactions.
>
> So I start the sample program CustomInteraction.py. And it does not seem
> to do anything. My "Middle" button is emulated, so I change the source to
> use the left button:
>
> style.SetLeftButtonPressMethod(StartPushPlane)
> style.SetLeftButtonReleaseMethod(EndPushPlane)
> style.SetUserInteractionMethod(PushPlane)
>
> This still does not do anything.
>
> The inner question: Where's a better sample for vtkInteractorStyleUser?
>
> The outer question: How do I just rotate around Y on a timer without any
> mousing at all?
>
>
More information about the vtkusers
mailing list