Vizard 6 » Command Index » Vizard modules » vizact » <vizact>.onwheeldown
6.2

<vizact>.onwheeldown

Registers a function to handle mousewheel down events

 

<vizact>.onwheeldown(  
func  
*args  
)  

 

func
The function to call when the mouse wheel is scrolled down
*args
The arguments to pass to the function

Remarks

The given function will be called when the mouse wheel is scrolled down

Return Value

A vizact.EventFunction object with the following methods:

Method

Description

<event>.setEnabled(val)

Enable/Disable the event function. The associated function will not be called while the event function is disabled. viz.TOGGLE can be used to toggle the state. Event functions are initially enabled.

<event>.getEnabled()

Get the enabled state of the event function.

<event>.remove()

Permanently unregister the event function.

Example

#Use mouse wheel to move viewpoint forward/backward
vizact.onwheelup(viz.MainView.move,[0,0,1])
vizact.onwheeldown(viz.MainView.move,[0,0,-1])

See also

<vizact>.onmousedown
<vizact>.onmouseup
<vizact>.onpick
<vizact>.onwheelup
<vizact>.whilemousedown