25#ifndef _SO_TOUCH_MANAGER
26#define _SO_TOUCH_MANAGER
240 void replaceEvent(
int i,
int j);
245 std::vector<SoTouchEvent> m_touchEvent;
248 std::vector<SoGestureRecognizer*> m_recognizerList;
256 bool m_touchScreenAvailable;
258 unsigned int m_supportedFingersNumber;
263 std::vector<unsigned long> m_allFingers;
269 int m_maxSimultaneousFingers;
271 std::vector<const SoEvent*> m_soeventlist;
Class for representation of a time.
Double tap gesture recognizer.
Base class for all gesture recognizers.
Long tap gesture recognizer.
Rotate gesture recognizer.
Scale (pinch) gesture recognizer.
Manages scene graph rendering and event handling.
Base class for touch events.
State
The different states a touch event can have.
Class for managing events from touch screen input devices.
const std::vector< unsigned long > & getAllFingerIds() const
Get the table with ids of all fingers touching the screen.
float getThreshold() const
Get the detection threshold (in pixels).
void addRecognizer(SoGestureRecognizer *recognizer)
Add a gesture recognizer to the recognizer list.
void addDefaultRecognizers()
Add a default list of recognizers to the recognizer list.
int getFingerNumber() const
Get the current number of fingers touching the screen.
const std::vector< const SoEvent * > & getTouchUpEvent(unsigned long fingerId, const SbVec2f &fingerPos, const SbTime &time)
Translate the given touch up event into a list of SoEvent.
void setThreshold(float t)
Set the detection threshold (0.0001 pixels by default).
SoDEPRECATED SoTouchEvent * updateAndProcessTouchEvent(unsigned long id, SoTouchEvent::State state, SbVec2f position, SbTime time)
Update finger's id of the event identified by id and process it with the scene manager.
void setMaxSimultaneousFingers(int fingers)
Set the maximum number of simultaneous fingers supported by the device.
SoDEPRECATED SoTouchManager(SoSceneManager *sM)
const SoTouchEvent * getEventById(unsigned long id) const
Get the corresponding event for the finger id, NULL if id is incorrect.
bool isTouchScreenAvailable()
Returns true if the touch screen device is available, false otherwise.
void removeRecognizer(SoGestureRecognizer *gesture)
Remove a gesture recognizer from the recognizer list.
virtual ~SoTouchManager()
void setTouchScreenAvailability(bool available)
Set the touch screen availability.
void removeDefaultRecognizers()
Remove the default recognizers from the recognizer list.
const std::vector< const SoEvent * > & getTouchMoveEvent(unsigned long fingerId, const SbVec2f &fingerPos, const SbTime &time)
Translate the given touch move event into a list of SoEvent.
int getMaxSimultaneousFingers() const
Get the maximum number of simultaneous fingers supported by the device.
const std::vector< const SoEvent * > & getTouchDownEvent(unsigned long fingerId, const SbVec2f &fingerPos, const SbTime &time)
Translate the given touch down event into a list of SoEvent.
const SoTouchEvent * getEventbyIndex(int index) const
Get the corresponding event for the index, NULL if index is incorrect.
const std::vector< SoGestureRecognizer * > & getRecognizerList() const
Returns the gesture recognizers list.