Click or drag to resize
SoMouseWheelEvent Class

Mouse wheel events.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.EventsSoEvent
      OIV.Inventor.EventsSoMouseWheelEvent

Namespace: OIV.Inventor.Events
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoMouseWheelEvent : SoEvent

The SoMouseWheelEvent type exposes the following members.

Constructors
  NameDescription
Public methodSoMouseWheelEvent

Constructor.

Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetDelta

Gets the mouse wheel delta.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetNormalizedPosition

Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region.

(Inherited from SoEvent.)
Public methodGetPosition

Returns the window pixel location of the cursor when the event occurred as integer values.

(Inherited from SoEvent.)
Public methodGetPosition(SbViewportRegion)

Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values.

(Inherited from SoEvent.)
Public methodGetPositionFloat

Returns the window pixel location of the cursor when the event occurred as float values.

(Inherited from SoEvent.)
Public methodGetPositionFloat(SbViewportRegion)

Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values.

(Inherited from SoEvent.)
Public methodGetTime

Gets the time at which the event occurred.

(Inherited from SoEvent.)
Public methodGetTrackerInfo

Gets whether an event object has associated tracker information.

(Inherited from SoEvent.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSetAltDown

Sets whether the ALT key was down when the event occurred.

(Inherited from SoEvent.)
Public methodSetButton1Down

Sets whether mouse Button 1 was down when the event occurred.

(Inherited from SoEvent.)
Public methodSetCtrlDown

Sets whether the CTRL key was down when the event occurred.

(Inherited from SoEvent.)
Public methodSetDelta

Sets the mouse wheel delta.

Public methodSetPosition(SbVec2f) (Inherited from SoEvent.)
Public methodSetPosition(SbVec2s)

Sets the window pixel location of the cursor when the event occurred.

(Inherited from SoEvent.)
Public methodSetShiftDown

Sets whether the shift key was down when the event occurred.

(Inherited from SoEvent.)
Public methodSetTime

Sets the time at which the event occurred.

(Inherited from SoEvent.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWasAltDown

Returns true if the ALT key was down when the event occurred.

(Inherited from SoEvent.)
Public methodWasButton1Down

Returns true if mouse button 1 was down when the event occurred.

(Inherited from SoEvent.)
Public methodWasCtrlDown

Returns true if the CTRL key was down when the event occurred.

(Inherited from SoEvent.)
Public methodWasShiftDown

Returns true if the shift key was down when the event occurred.

(Inherited from SoEvent.)
Top
Remarks

OIV.Inventor.Events.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 OIV.Inventor.SoPreferences).

The OIV.Inventor.Events.SoMouseWheelEvent.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