Double tap gesture recognizer. More...
#include <Inventor/gestures/recognizers/SoDoubleTapGestureRecognizer.h>
Public Member Functions | |
SoDoubleTapGestureRecognizer () | |
virtual | ~SoDoubleTapGestureRecognizer () |
SoEvent * | recognize (SoEvent *touchEvent) |
SbTime | getMaximumTapDuration () const |
SbTime | getMaximumDurationBetweenTap () const |
int | getSpatialRestriction (void) const |
void | setMaximumTapDuration (SbTime time) |
void | setMaximumDurationBetweenTap (SbTime t) |
void | setSpatialRestriction (int c) |
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
SoDoubleTapGestureRecognizer::SoDoubleTapGestureRecognizer | ( | ) |
Constructor.
virtual SoDoubleTapGestureRecognizer::~SoDoubleTapGestureRecognizer | ( | ) | [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)