[vtk-developers] Mouse wheel support in VTK
Jeff Lee
jeff at cdnorthamerica.com
Thu Jan 29 07:26:26 EST 2004
Mathieu Malaterre wrote:
> Ok I like that.
>
> I made some changes to the Wrapping directory, but I realize there is
> still lots of works.
> For example I don't know how to do write a mouse wheel listener in Java.
I can do this, or help you if you like.
-Jeff
> I haven't also updated the Qt and GTK RWI, as I don't know much of the
> API.
>
> Mathieu
>
> Sebastien BARRE wrote:
>
>> At 1/28/2004 09:58 AM, Mathieu Malaterre wrote:
>>
>>> Commit has been done.
>>
>>
>>
>> I added a quick (and I hope not too dirty) support for mouse wheel in
>> the default camera interactor styles. "Wheel forward" will zoom in,
>> "backward" will zoom out.
>>
>> in vtkInteractorStyle, I added:
>> virtual void OnMouseWheelForward() {};
>> virtual void OnMouseWheelBackward() {};
>>
>> as well as a MouseWheelMotionFactor so that some control can be
>> achieved on what a "mouse wheel motion step" represents (i.e, it's a
>> multiplier, you can change it to specify how much of a change a wheel
>> motion step represents).
>>
>> In vtkInteractorStyleJoystickCamera and
>> vtkInteractorStyleTrackballCamera, those 2 functions are overriden to
>> perform zoom in/zoom out. The same thing could be done for the other
>> interactor styles.
>>
>> On the 3D widgets side (which inherit from vtkInteractorObserver, not
>> vtkInteractorStyle), you can just update your ProcessEvents() to
>> listen for MouseWheelForwardEvent, and MouseWheelBackwardEvent, and
>> act accordingly.
>>
>>
>> --
>> Sebastien Barre
>>
>>
>> _______________________________________________
>> vtk-developers mailing list
>> vtk-developers at vtk.org
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
More information about the vtk-developers
mailing list