Click or drag to resize
SoTouchManager Class

Class for managing events from touch screen input devices.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.TouchSoTouchManager

Namespace: OIV.Inventor.Touch
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.1.1.0 (2024.1.1)
Syntax
public class SoTouchManager : SoNetBase

The SoTouchManager type exposes the following members.

Constructors
  NameDescription
Public methodSoTouchManager
Initializes a new instance of the SoTouchManager class
Public methodSoTouchManager(SoSceneManager) Obsolete.
Initializes a new instance of the SoTouchManager class
Top
Methods
  NameDescription
Public methodAddDefaultRecognizers

Add a default list of recognizers to the recognizer list.

Public methodAddRecognizer

Add a gesture recognizer to the recognizer list.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetAllFingerIds

Get the table with ids of all fingers touching the screen.

Public methodGetEventById

Get the corresponding event for the finger id, NULL if id is incorrect.

Public methodGetEventbyIndex

Get the corresponding event for the index, NULL if index is incorrect.

Public methodGetFingerNumber

Get the current number of fingers touching the screen.

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

Get the maximum number of simultaneous fingers supported by the device.

Public methodGetRecognizerList

Returns the gesture recognizers list.

Public methodGetThreshold

Get the detection threshold (in pixels).

Public methodGetTouchDownEvent

Translate the given touch down event into a list of OIV.Inventor.Events.SoEvent.

Public methodGetTouchMoveEvent

Translate the given touch move event into a list of OIV.Inventor.Events.SoEvent.

Public methodGetTouchUpEvent

Translate the given touch up event into a list of OIV.Inventor.Events.SoEvent.

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

Returns true if the touch screen device is available, false otherwise.

Public methodRemoveDefaultRecognizers

Remove the default recognizers from the recognizer list.

Public methodRemoveRecognizer

Remove a gesture recognizer from the recognizer list.

Public methodSetMaxSimultaneousFingers

Set the maximum number of simultaneous fingers supported by the device.

Public methodSetThreshold

Set the detection threshold (0.0001 pixels by default).

Public methodSetTouchScreenAvailability

Set the touch screen availability.

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

Update finger's id of the event identified by id and process it with the scene manager.

Top
Remarks

This is the base class for managing events from touch screen input devices. A touch manager has a OIV.Inventor.Touch.Events.SoTouchEvent table and a finger ids table which are updated each time a finger moves. A touch manager has a list of gesture recognizers that generate events when the gesture is recognized. By default, the list is empty and recognizers must be added to generate the corresponding events. The OIV.Inventor.Touch.SoTouchManager.AddDefaultRecognizers() method is provided for convenience.

Note that all registered gesture recognizers are active simultaneously. During a gesture event, events may generated for a different gesture. The application is responsible for enforcing a "one gesture at a time" policy if appropriate.

Note: Unlike mouse and keyboard events, the application must explicitly register a touch screen device (e.g. OIV.Inventor.Touch.Devices.SoWinTouchScreen) in order to get touch events.

EXAMPLE

Get the touch manager from the touch device to register gesture recognizers.

SoScaleGestureRecognizer  scaleRecognizer  = new SoScaleGestureRecognizer();
SoRotateGestureRecognizer rotateRecognizer = new SoRotateGestureRecognizer();

SoWinTouchScreen touchScreenDevice = new SoWinTouchScreen(this);
touchScreenDevice.GetTouchManager().AddRecognizer(scaleRecognizer);
touchScreenDevice.GetTouchManager().AddRecognizer(rotateRecognizer);

See Also