public class SoMouseWheelEvent extends SoEvent
SoMouseWheelEvent
represents 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 SoPreferences
).
The 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).
See also:
SoEvent
, SoButtonEvent
, SoKeyboardEvent
, SoMotion3Event
, SoMouseButtonEvent
, SoSpaceballButtonEvent
, SoHandleEventAction
, SoEventCallback
, SoSelection
, SoInteraction, SoWinDevice, SoMouseWheelEvent
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoMouseWheelEvent()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getDelta()
Gets the mouse wheel delta.
|
void |
setDelta(int delta)
Sets the mouse wheel delta.
|
getNormalizedPosition, getPosition, getPosition, getPositionFloat, getPositionFloat, getTime, setAltDown, setButton1Down, setCtrlDown, setPosition, setPosition, setShiftDown, setTime, wasAltDown, wasButton1Down, wasCtrlDown, wasShiftDown
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com