Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoDoubleTapGestureRecognizer Class Reference

Double tap gesture recognizer. More...

#include <Inventor/gestures/recognizers/SoDoubleTapGestureRecognizer.h>

+ Inheritance diagram for SoDoubleTapGestureRecognizer:

Public Member Functions

 SoDoubleTapGestureRecognizer ()
 Constructor.
 
virtual ~SoDoubleTapGestureRecognizer ()
 Destructor.
 
SoEventrecognize (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.
 

Detailed Description

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:

  • In order to get touch events for the gesture recognizer(s) to recognize, the application must explicitly register a touch screen device (SoWinTouchScreen, SoQtTouchScreen, etc).
  • In order to get gesture events, the application must explicitly register gesture recognizers with the touch screen device's touch manager (SoTouchManager).

SEE ALSO

SoGestureRecognizer, SoLongTapGestureRecognizer, SoRotateGestureRecognizer, SoScaleGestureRecognizer, SoDoubleTapGestureEvent

Definition at line 86 of file SoDoubleTapGestureRecognizer.h.

Constructor & Destructor Documentation

◆ SoDoubleTapGestureRecognizer()

SoDoubleTapGestureRecognizer::SoDoubleTapGestureRecognizer ( )

Constructor.

◆ ~SoDoubleTapGestureRecognizer()

virtual SoDoubleTapGestureRecognizer::~SoDoubleTapGestureRecognizer ( )
virtual

Destructor.

Member Function Documentation

◆ getMaximumDurationBetweenTap()

SbTime SoDoubleTapGestureRecognizer::getMaximumDurationBetweenTap ( ) const

Gets the maximum time that can elapse between the two taps of a double tap.

(0.5 seconds by default)

◆ getMaximumTapDuration()

SbTime SoDoubleTapGestureRecognizer::getMaximumTapDuration ( ) const

Gets tap maximum duration (1.0 seconds by default).

◆ getSpatialRestriction()

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).

◆ recognize()

SoEvent * SoDoubleTapGestureRecognizer::recognize ( SoEvent touchEvent)
virtual

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.

◆ setMaximumDurationBetweenTap()

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)

◆ setMaximumTapDuration()

void SoDoubleTapGestureRecognizer::setMaximumTapDuration ( SbTime  time)

Sets tap maximum duration (1.0 seconds by default).

◆ setSpatialRestriction()

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)


The documentation for this class was generated from the following file: