SoMouseGrabber¶
-
InventorModule
¶ genre Interaction
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoUtils
definition utils.def see also SoKeyGrabber
keywords iv
,event
,interaction
Purpose¶
The module SoMouseGrabber
grabs mouse events in an Open Inventor scene and converts them to float fields.
Details¶
The mouse coordinates received from a connected display can be filtered and scaled before the fields X and Y are set.
Parameter Fields¶
Field Index¶
Alt : Enum |
cursorShape : Enum |
Wheel : Float |
Alt Pressed : Bool |
Flip X : Bool |
Wheel Max : Float |
Button1 : Enum |
Flip Y : Bool |
Wheel Min : Float |
button1DoubleClicked : Trigger |
interactionProviderID : String |
Wheel Overflow : Bool |
Button1Pressed : Bool |
Mask Valid : Bool |
Wheel Step : Float |
Button2 : Enum |
Normalized : Bool |
wheelDown : Trigger |
button2DoubleClicked : Trigger |
On : Bool |
wheelUp : Trigger |
Button2Pressed : Bool |
released : Trigger |
X : Float |
Button3 : Enum |
Sensitivity : Float |
X absolute : Float |
button3DoubleClicked : Trigger |
Set Event Handled : Bool |
Xmax : Float |
Button3Pressed : Bool |
Set Wheel Event Handled : Bool |
Xmin : Float |
Clamp : Bool |
Shift : Enum |
Y : Float |
Ctrl : Enum |
Shift Pressed : Bool |
Y absolute : Float |
Ctrl Pressed : Bool |
Swap XY : Bool |
Ymax : Float |
Cursor Present : Bool |
useManagedInteraction : Bool |
Ymin : Float |
Visible Fields¶
Normalized¶
-
name:
normalized
, type:
Bool
, default:
FALSE
¶ If checked, the x and y values are generated to be between xmin/xmax and ymin/ymax regarding the current viewport.
Clamp¶
-
name:
clamp
, type:
Bool
, default:
TRUE
¶ If checked, values are clamped to [xmin,xmax] and [ymin, ymax] in normalized-mode.
Otherwise, values out of this range are possible if the mouse is moved outside the viewport.
Button1¶
-
name:
button1
, type:
Enum
, default:
RELEASED
¶ Defines a filter for mouse button 1.
Values:
Title | Name |
---|---|
Pressed | PRESSED |
Released | RELEASED |
Ignored | IGNORED |
Button2¶
-
name:
button2
, type:
Enum
, default:
PRESSED
¶ Defines a filter for mouse button 2.
Values:
Title | Name |
---|---|
Pressed | PRESSED |
Released | RELEASED |
Ignored | IGNORED |
Button3¶
-
name:
button3
, type:
Enum
, default:
RELEASED
¶ Defines a filter for mouse button 3.
Values:
Title | Name |
---|---|
Pressed | PRESSED |
Released | RELEASED |
Ignored | IGNORED |
Button1Pressed¶
-
name:
button1Pressed
, type:
Bool
, persistent:
no
¶ Shows whether mouse button 1 is pressed.
Button2Pressed¶
-
name:
button2Pressed
, type:
Bool
, persistent:
no
¶ Shows whether mouse button 2 is pressed.
Button3Pressed¶
-
name:
button3Pressed
, type:
Bool
, persistent:
no
¶ Shows whether mouse button 3 is pressed.
Shift¶
-
name:
shift
, type:
Enum
, default:
RELEASED
¶ Sets a filter for the SHIFT key.
Values:
Title | Name |
---|---|
Pressed | PRESSED |
Released | RELEASED |
Ignored | IGNORED |
Ctrl¶
-
name:
ctrl
, type:
Enum
, default:
RELEASED
¶ Sets a filter for the CTRL key.
Values:
Title | Name |
---|---|
Pressed | PRESSED |
Released | RELEASED |
Ignored | IGNORED |
Alt¶
-
name:
alt
, type:
Enum
, default:
RELEASED
¶ Sets a filter for the ALT key.
Values:
Title | Name |
---|---|
Pressed | PRESSED |
Released | RELEASED |
Ignored | IGNORED |
X absolute¶
-
name:
absX
, type:
Float
, persistent:
no
¶ Shows the absolute x-position of the mouse cursor in pixels from the left border of the viewer.
Y absolute¶
-
name:
absY
, type:
Float
, persistent:
no
¶ Shows the absolute y-position of the mouse cursor in pixels from the lower border of the viewer.
X¶
-
name:
x
, type:
Float
, minimum:
:field:`xmin`
, maximum:
:field:`xmax`
, persistent:
no
¶ Shows the x-position of the mouse cursor.
Y¶
-
name:
y
, type:
Float
, minimum:
:field:`ymin`
, maximum:
:field:`ymax`
, persistent:
no
¶ Shows the y-position of the mouse cursor.
Xmin¶
-
name:
xmin
, type:
Float
, default:
0
¶ Sets a minimum value for the x-position for clamping and normalizing.
Xmax¶
-
name:
xmax
, type:
Float
, default:
1
¶ Sets a maximum value for the x-position for clamping and normalizing.
Ymin¶
-
name:
ymin
, type:
Float
, default:
0
¶ Sets a minimum value for the y-position for clamping and normalizing.
Ymax¶
-
name:
ymax
, type:
Float
, default:
1
¶ Sets a maximum value for the y-position for clamping and normalizing.
Cursor Present¶
-
name:
cursorPresent
, type:
Bool
, persistent:
no
¶ Shows whether the mouse cursor is within the viewing area.
This will remain set as long as the mouse buttons are pressed, as an automatic mouse grab is in effect. This flag is completely independent of any modifiers/buttons.
Mask Valid¶
-
name:
maskValid
, type:
Bool
, persistent:
no
¶ Shows whether the conditions set by the mask filters are met.
Set Event Handled¶
-
name:
setEventHandled
, type:
Bool
, default:
FALSE
¶ If checked, button and move events are set handled if the mask is valid.
The event is therefore consumed and not evaluated by any further nodes! This can be of use if you want to coordinate several SoMouseGrabbers. It is also compatible with the event consumption mechanism of the SoView2D framework (see
SoView2DExtensions
for details).
Set Wheel Event Handled¶
-
name:
setWheelEventHandled
, type:
Bool
, default:
FALSE
¶ If checked, wheel events are set handled.
The event is therefore consumed and not evaluated by any further nodes! This can be of use if you want to coordinate several SoMouseGrabbers. It is also compatible with the event consumption mechanism of the SoView2D framework (see
SoView2DExtensions
for details).
Swap XY¶
-
name:
swapXY
, type:
Bool
, default:
FALSE
¶ If checked, the x-axis and the y-axis are swapped.
Sensitivity¶
-
name:
sensitivity
, type:
Float
, default:
1
, minimum:
0.01
, maximum:
10
¶ Sets the sensitivity for mouse movement.
Wheel Overflow¶
Wheel Step¶
-
name:
wheelStep
, type:
Float
, default:
1
¶ Sets the step of mouse wheel increment and decrement.