public class SoMouseWheelEvent extends SoEventMouse wheel events.
SoMouseWheelEventrepresents a change in mouse wheel rotation event in the Open Inventor event model.
The wheel has discrete, evenly spaced notches. When you rotate the wheel, a wheel message is sent as each notch is encountered. Most modern mouse wheels generate an event with a value of 120 per each notch of the wheel. Pressing the shift key while moving the mouse wheel will generate events of double the wheel delta (i.e., 240 by default). If necessary, you can use environment variable OIV_WHEEL_DELTA to change this value (see
getDelta()method returns the distance that the mouse wheel has been rotated. A positive value indicates the wheel was rotated forward (away from the user); a negative value indicates the wheel was rotated backwards (toward the user). The values are specified in multiples of the wheel delta.
NOTE: Wheel delta values are NOT always +/- 120. In the case of wheel delta values in a browser, i.e. using RemoteViz, the base delta value seems to be scaled by the Windows Zoom level. E.g. with Windows 7 and Chrome, when using the default/typical "Medium" setting, the zoom level is 125% and the browser returns 125% * 120 = 150. It is safe to use the sign of the value (positive or negative).
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
getDelta()Gets the mouse wheel delta.
setDelta(int delta)Sets the mouse wheel delta.
Methods inherited from class com.openinventor.inventor.events.SoEvent
getNormalizedPosition, getPosition, getPosition, getPositionFloat, getPositionFloat, getTime, setAltDown, setButton1Down, setCtrlDown, setPosition, setPosition, setShiftDown, setTime, wasAltDown, wasButton1Down, wasCtrlDown, wasShiftDown