Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoScaleGestureRecognizer Class Reference

Scale (pinch) gesture recognizer. More...

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

+ Inheritance diagram for SoScaleGestureRecognizer:

Public Member Functions

 SoScaleGestureRecognizer ()
 Constructor.
 
virtual ~SoScaleGestureRecognizer ()
 Destructor.
 
SoEventrecognize (SoEvent *touchEvent)
 If two fingers are "pinching" on the screen, it returns an event with the ratio between the current distance between fingers and the initial distance when the second finger was put down.
 

Detailed Description

Scale (pinch) gesture recognizer.

SoScaleGestureRecognizer analyses touch events and recognizes a scale (two finger pinch) gesture. It returns an SoScaleGestureEvent (pinch) event if this gesture is recognized. The scale event contains the scale factor between the current state and the initial one. This recognizer generates a BEGIN event, followed by DELTA events and finishing with an END event (SoGestureEvent::getGestureState()).

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, SoRotateGestureRecognizer, SoDoubleTapGestureRecognizer, SoLongTapGestureRecognizer, SoScaleGestureEvent

Definition at line 87 of file SoScaleGestureRecognizer.h.

Constructor & Destructor Documentation

◆ SoScaleGestureRecognizer()

SoScaleGestureRecognizer::SoScaleGestureRecognizer ( )

Constructor.

◆ ~SoScaleGestureRecognizer()

virtual SoScaleGestureRecognizer::~SoScaleGestureRecognizer ( )
virtual

Destructor.

Member Function Documentation

◆ recognize()

SoEvent * SoScaleGestureRecognizer::recognize ( SoEvent touchEvent)
virtual

If two fingers are "pinching" on the screen, it returns an event with the ratio between the current distance between fingers and the initial distance when the second finger was put down.

If no gesture has been recognized, returns null. Returns a pointer to an internal data object. Do not modify or delete this object.

Implements SoGestureRecognizer.


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