"""
Start this example with 
$ python Wheel.py
Then play with the mouse wheel.
"""

import vtk

cone = vtk.vtkConeSource()

coneMapper = vtk.vtkPolyDataMapper()
coneMapper.SetInput( cone.GetOutput() )

coneActor = vtk.vtkActor()
coneActor.SetMapper( coneMapper )

ren1= vtk.vtkRenderer()
ren1.AddActor( coneActor )

renWin = vtk.vtkRenderWindow()
renWin.AddRenderer( ren1 )

iren = vtk.vtkRenderWindowInteractor ()
iren.SetRenderWindow (renWin)


def Forward(object, event):
    print "Forward"

def Backward(object, event):
    print "Backward"

iren.AddObserver("MouseWheelForwardEvent", Forward)
iren.AddObserver("MouseWheelBackwardEvent", Backward)

iren.Initialize()
iren.Start()

