Double tap gesture recognizer. More...
#include <Inventor/gestures/recognizers/SoDoubleTapGestureRecognizer.h>
Public Member Functions | |
SoDoubleTapGestureRecognizer () | |
Constructor. | |
virtual | ~SoDoubleTapGestureRecognizer () |
Destructor. | |
SoEvent * | recognize (SoEvent *touchEvent) |
If a double tap gesture is recognized, returns an SoDoubleTapGestureEvent, else returns null. | |
SbTime | getMaximumTapDuration () const |
Gets tap maximum duration (1.0 seconds by default). | |
SbTime | getMaximumDurationBetweenTap () const |
Gets the maximum time that can elapse between the two taps of a double tap. | |
int | getSpatialRestriction (void) const |
Gets the radius of limitation circle in which the finger has to stay throughout the gesture (60 pixels by default). | |
void | setMaximumTapDuration (SbTime time) |
Sets tap maximum duration (1.0 seconds by default). | |
void | setMaximumDurationBetweenTap (SbTime t) |
Sets the maximum time that can elapse between the two taps of a double tap. | |
void | setSpatialRestriction (int c) |
Sets the radius of limitation circle in which the finger has to stay throughout the gesture. | |
Double tap gesture recognizer.
SoDoubleTapGestureRecognizer analyses touch events and recognizes a one finger double-tap gesture. It returns an SoDoubleTapGestureEvent with this gesture is recognized. The finger has to stay in a limitation area from the down event to the end one and must be completed within a maximum elapsed time. This recognizer only generates an END event.
Note:
SoGestureRecognizer, SoLongTapGestureRecognizer, SoRotateGestureRecognizer, SoScaleGestureRecognizer, SoDoubleTapGestureEvent
Definition at line 86 of file SoDoubleTapGestureRecognizer.h.
SoDoubleTapGestureRecognizer::SoDoubleTapGestureRecognizer | ( | ) |
Constructor.
|
virtual |
Destructor.
SbTime SoDoubleTapGestureRecognizer::getMaximumDurationBetweenTap | ( | ) | const |
Gets the maximum time that can elapse between the two taps of a double tap.
(0.5 seconds by default)
SbTime SoDoubleTapGestureRecognizer::getMaximumTapDuration | ( | ) | const |
Gets tap maximum duration (1.0 seconds by default).
int SoDoubleTapGestureRecognizer::getSpatialRestriction | ( | void | ) | const |
Gets the radius of limitation circle in which the finger has to stay throughout the gesture (60 pixels by default).
If a double tap gesture is recognized, returns an SoDoubleTapGestureEvent, else returns null.
Returns a pointer to an internal data object. Do not modify or delete this object.
Implements SoGestureRecognizer.
void SoDoubleTapGestureRecognizer::setMaximumDurationBetweenTap | ( | SbTime | t | ) |
Sets the maximum time that can elapse between the two taps of a double tap.
(0.5 seconds by default)
void SoDoubleTapGestureRecognizer::setMaximumTapDuration | ( | SbTime | time | ) |
Sets tap maximum duration (1.0 seconds by default).
void SoDoubleTapGestureRecognizer::setSpatialRestriction | ( | int | c | ) |
Sets the radius of limitation circle in which the finger has to stay throughout the gesture.
(60 pixels by default)