SoMouseGrabber

InventorModule
genre Interaction
author Florian Link
package MeVisLab/Standard
dll SoUtils
definition utils.def
see also SoKeyGrabber
keywords iv, event, interaction

Purpose

The module SoMouseGrabber grabs mouse events in an 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.

Windows

Default Panel

../../../Modules/Inventor/SoUtils/mhelp/Images/Screenshots/SoMouseGrabber._default.png

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

Alt: Enum cursorShape: Enum Wheel Min: Float
Alt Pressed: Bool Flip X: Bool Wheel Overflow: Bool
Button1: Enum Flip Y: Bool Wheel Step: Float
button1DoubleClicked: Trigger Mask Valid: Bool wheelDown: Trigger
Button1Pressed: Bool Normalized: Bool wheelUp: Trigger
Button2: Enum On: Bool X: Float
button2DoubleClicked: Trigger released: Trigger X absolute: Float
Button2Pressed: Bool Sensitivity: Float Xmax: Float
Button3: Enum Set Event Handled: Bool Xmin: Float
button3DoubleClicked: Trigger Set Wheel Event Handled: Bool Y: Float
Button3Pressed: Bool Shift: Enum Y absolute: Float
Clamp: Bool Shift Pressed: Bool Ymax: Float
Ctrl: Enum Swap XY: Bool Ymin: Float
Ctrl Pressed: Bool Wheel: Float  
Cursor Present: Bool Wheel Max: Float  

Visible Fields

On

name: on, type: Bool, default: TRUE

If checked, the module grabs mouse events.

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, default: FALSE

Shows whether mouse button 1 is pressed.

Button2Pressed

name: button2Pressed, type: Bool, default: FALSE

Shows whether mouse button 2 is pressed.

Button3Pressed

name: button3Pressed, type: Bool, default: FALSE

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

Values:

Title Name
Pressed PRESSED
Released RELEASED
Ignored IGNORED

Shift Pressed

name: shiftPressed, type: Bool, default: FALSE

Shows whether SHIFT is pressed.

Ctrl Pressed

name: ctrlPressed, type: Bool, default: FALSE

Shows whether CTRL is pressed.

Alt Pressed

name: altPressed, type: Bool, default: FALSE

X absolute

name: absX, type: Float, default: 0

Shows the absolute x-position of the mouse cursor in pixel from the left border of the viewer.

Y absolute

name: absY, type: Float, default: 0

Shows the absolute y-position of the mouse cursor in pixel from the lower border of the viewer.

X

name: x, type: Float, default: 0.5, minimum: :field:`xmin`, maximum: :field:`xmax`

Shows the x-position of the mouse cursor.

Y

name: y, type: Float, default: 0.5, minimum: :field:`ymin`, maximum: :field:`ymax`

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, default: FALSE

Shows whether the mouse cursor is within the viewing area.

This will stay set as long as mouse buttons are pressed, since then an automatic mouse grab is in effect. This flag is completely independent of any modifiers/buttons.

Mask Valid

name: maskValid, type: Bool, default: FALSE

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 SoView2D Overview 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 SoView2D Overview for details).

Flip X

name: flipX, type: Bool, default: FALSE

If checked, the x-axis is flipped.

Flip Y

name: flipY, type: Bool, default: FALSE

If checked, the y-axis is flipped.

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

name: wheelOverflow, type: Bool, default: FALSE

If checked, the value of the field Wheel wraps around.

For example, if the value is incremented beyond the maximum value, it is set to the minimum value, and vice versa.

Wheel

name: wheel, type: Float, default: 0

Shows the current value of the mouse wheel.

Wheel Step

name: wheelStep, type: Float, default: 1

Sets the step of mouse wheel increment and decrement.

Wheel Min

name: wheelMin, type: Float, default: 0

Sets a minimum value for the mouse wheel interval.

Wheel Max

name: wheelMax, type: Float, default: 100

Sets a maximum value for the mouse wheel interval.

Hidden Fields

button1DoubleClicked

name: button1DoubleClicked, type: Trigger

button2DoubleClicked

name: button2DoubleClicked, type: Trigger

button3DoubleClicked

name: button3DoubleClicked, type: Trigger

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

Values:

Title Name
Undefined Cursor UNDEFINED_CURSOR
Default Cursor DEFAULT_CURSOR
Forbidden Cursor FORBIDDEN_CURSOR
Pointing Hand Cursor POINTING_HAND_CURSOR
Open Hand Cursor OPEN_HAND_CURSOR
Closed Hand Cursor CLOSED_HAND_CURSOR
Move All Cursor MOVE_ALL_CURSOR
Move Hori Cursor MOVE_HORI_CURSOR
Move Vert Cursor MOVE_VERT_CURSOR
Move Fdiag Cursor MOVE_FDIAG_CURSOR
Move Bdiag Cursor MOVE_BDIAG_CURSOR
Move Inout Cursor MOVE_INOUT_CURSOR
Rotate X Cursor ROTATE_X_CURSOR
Rotate Y Cursor ROTATE_Y_CURSOR
Rotate Z Cursor ROTATE_Z_CURSOR
Rotate Xy Cursor ROTATE_XY_CURSOR
Zoom Cursor ZOOM_CURSOR
Zoom In Cursor ZOOM_IN_CURSOR
Zoom Out Cursor ZOOM_OUT_CURSOR
Cross Cursor CROSS_CURSOR
Cross Plus Cursor CROSS_PLUS_CURSOR
Cross Minus Cursor CROSS_MINUS_CURSOR
Cross Move Cursor CROSS_MOVE_CURSOR
Cross Rotate Cursor CROSS_ROTATE_CURSOR
Cross Rect Cursor CROSS_RECT_CURSOR
Cross Oval Cursor CROSS_OVAL_CURSOR
Cross Vector Cursor CROSS_VECTOR_CURSOR
Cross Freeform Cursor CROSS_FREEFORM_CURSOR
Cross Point Cursor CROSS_POINT_CURSOR
Cross Line Cursor CROSS_LINE_CURSOR
Cross Curve Cursor CROSS_CURVE_CURSOR
Cross Polyline Cursor CROSS_POLYLINE_CURSOR
Cross Polygon Cursor CROSS_POLYGON_CURSOR
Cross Fill Cursor CROSS_FILL_CURSOR
Cross Link Cursor CROSS_LINK_CURSOR
Cross 0 Cursor CROSS_0_CURSOR
Cross 1 Cursor CROSS_1_CURSOR
Cross 2 Cursor CROSS_2_CURSOR
Cross 3 Cursor CROSS_3_CURSOR
Lut Cursor LUT_CURSOR
Slicing Cursor SLICING_CURSOR
Cross 4 Cursor CROSS_4_CURSOR
Cross 5 Cursor CROSS_5_CURSOR
Cross 6 Cursor CROSS_6_CURSOR
Cross 7 Cursor CROSS_7_CURSOR
Cross 8 Cursor CROSS_8_CURSOR
Cross 9 Cursor CROSS_9_CURSOR
Lut 1 Cursor LUT_1_CURSOR
Lut 2 Cursor LUT_2_CURSOR
Lut 3 Cursor LUT_3_CURSOR

released

name: released, type: Trigger

wheelUp

name: wheelUp, type: Trigger

wheelDown

name: wheelDown, type: Trigger