| SoTouchManager Class |
Class for managing events from touch screen input devices.
Namespace: OIV.Inventor.Touch
The SoTouchManager type exposes the following members.
| Name | Description | |
|---|---|---|
| SoTouchManager | Initializes a new instance of the SoTouchManager class | |
| SoTouchManager(SoSceneManager) | Obsolete. Initializes a new instance of the SoTouchManager class |
| Name | Description | |
|---|---|---|
| AddDefaultRecognizers | Add a default list of recognizers to the recognizer list. | |
| AddRecognizer | Add a gesture recognizer to the recognizer list. | |
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| GetAllFingerIds | Get the table with ids of all fingers touching the screen. | |
| GetEventById | Get the corresponding event for the finger id, NULL if id is incorrect. | |
| GetEventbyIndex | Get the corresponding event for the index, NULL if index is incorrect. | |
| GetFingerNumber | Get the current number of fingers touching the screen. | |
| GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
| GetMaxSimultaneousFingers | Get the maximum number of simultaneous fingers supported by the device. | |
| GetRecognizerList | Returns the gesture recognizers list. | |
| GetThreshold | Get the detection threshold (in pixels). | |
| GetTouchDownEvent | Translate the given touch down event into a list of OIV.Inventor.Events.SoEvent. | |
| GetTouchMoveEvent | Translate the given touch move event into a list of OIV.Inventor.Events.SoEvent. | |
| GetTouchUpEvent | Translate the given touch up event into a list of OIV.Inventor.Events.SoEvent. | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsTouchScreenAvailable | Returns true if the touch screen device is available, false otherwise. | |
| RemoveDefaultRecognizers | Remove the default recognizers from the recognizer list. | |
| RemoveRecognizer | Remove a gesture recognizer from the recognizer list. | |
| SetMaxSimultaneousFingers | Set the maximum number of simultaneous fingers supported by the device. | |
| SetThreshold | Set the detection threshold (0.0001 pixels by default). | |
| SetTouchScreenAvailability | Set the touch screen availability. | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) | |
| UpdateAndProcessTouchEvent | Obsolete. Update finger's id of the event identified by id and process it with the scene manager. |
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.
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);