[vtkusers] Question
Prabhu Ramachandran
prabhu at aero.iitm.ernet.in
Sat Nov 9 04:12:54 EST 2002
>>>> "YC" == "Yi-Yu Chou" <chouyiyu at hotmail.com> writes:
YC> vtkRenderWindowInteractor, is it=20 possible to close the
YC> function of "rotate"(Button 1), =20 but still have
YC> "pan"(Button2),and "zoom"(Button3). Please give me some ideas
YC> or examples.
Yes, yoou can disable rotation pretty easily. If you consider the
example in vtk/tk/vtkTkRenderWindowInteractor.py just add the
following:
pane.bind("<ButtonPress-1>", lambda e: e)
and put it anywhere after you create the pane object. Basically this
disables button 1 events and thereby prevents rotation. Ofcourse this
is true for the vtkTkRenderWindowInteractor. I havent checked the
default vtkRenderWindowInteractor. You might need to add an observer
for that class.
cheers,
prabhu
More information about the vtkusers
mailing list