[vtk-developers] vtkInteractorStyleFlight doesn't work?

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Sat Jul 6 08:05:59 EDT 2002


Prabhu

InteractortyleFlight stopped working a few months back. About the same time
that Seb did some changes to the interactors <cough cough!>

Its been on my list of things to look at for a while now but I haven't got
around to it. I thought that I'd also upgrade the motion to be a bit more
smooth and flight simulator-like as it is a bit jerky in its old
incarnation. Not many people are using it I don't think, so I doubt anyone
will mind. (Only 4 people knew it was broken AFAIK (=you me seb and dean)
(until now))

JB

----- Original Message -----
From: "Prabhu Ramachandran" <prabhu at aero.iitm.ernet.in>
To: <vtk-developers at public.kitware.com>
Sent: Saturday, July 06, 2002 10:27 AM
Subject: [vtk-developers] vtkInteractorStyleFlight doesn't work?


> hi,
>
> I was just playing with the various interactor styles and found that
> the InteractorStyleFlight was not working as I expected.  I found that
> the other styles worked fine (Joystick, trackball, unicam and
> terrain).  Maybe I'm doing something wrong?
>
> Here is a small Python code snippet that shows how I tested.
>
> prabhu
>
> # --- cut here ---
> import Tkinter, vtk
> from vtk.tk.vtkTkRenderWindowInteractor import vtkTkRenderWindowInteractor
>
> def vtkRenderWindowInteractorConeExample():
>     """Like it says, just a simple example
>     """
>     # create root window
>     root = Tkinter.Tk()
>
>     # create vtkTkRenderWidget
>     pane = vtkTkRenderWindowInteractor(root, width=300, height=300)
>     pane.Initialize()
>
>     def quit(obj=root):
>         obj.quit()
>
>     pane.SetExitMethod(quit)
>
>     ren = vtk.vtkRenderer()
>     pane.GetRenderWindow().AddRenderer(ren)
>
>     s = vtk.vtkInteractorStyleFlight()
>     pane.SetInteractorStyle(s)
>     pane.Initialize()
>     print s
>
>     cone = vtk.vtkConeSource()
>     cone.SetResolution(8)
>
>     coneMapper = vtk.vtkPolyDataMapper()
>     coneMapper.SetInput(cone.GetOutput())
>
>     coneActor = vtk.vtkActor()
>     coneActor.SetMapper(coneMapper)
>
>     ren.AddActor(coneActor)
>
>     # pack the pane into the tk root
>     pane.pack(fill='both', expand=1)
>     pane.Start()
>
>     # start the tk mainloop
>     root.mainloop()
>
> if __name__ == "__main__":
>     vtkRenderWindowInteractorConeExample()
>
> # --- cut here ---
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtk-developers




More information about the vtk-developers mailing list