Base class for gesture events. More...
#include <Inventor/gestures/events/SoGestureEvent.h>
Public Types | |
enum | GestureState { BEGIN , DELTA , END } |
The different states a gesture event can have. More... | |
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
SoGestureEvent () | |
Constructor. | |
virtual | ~SoGestureEvent () |
Destructor. | |
GestureState | getGestureState () const |
Gets the gesture event state (Begin,Delta,End). | |
Public Member Functions inherited from SoEvent | |
SoEvent () | |
Constructor. | |
virtual | ~SoEvent () |
Destructor. | |
virtual void | setTime (SbTime t) |
Sets the time at which the event occurred. | |
SbTime | getTime () const |
Gets the time at which the event occurred. | |
virtual void | setPosition (const SbVec2s &p) |
Sets the window pixel location of the cursor when the event occurred. | |
virtual void | setPosition (const SbVec2f &p) |
Float version of setPosition(const SbVec2s &p). | |
const SbVec2s & | getPosition () const |
Returns the window pixel location of the cursor when the event occurred as integer values. | |
const SbVec2f & | getPositionFloat () const |
Returns the window pixel location of the cursor when the event occurred as float values. | |
const SbVec2s & | getPosition (const SbViewportRegion &vpRgn) const |
Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values. | |
const SbVec2f & | getPositionFloat (const SbViewportRegion &vpRgn) const |
Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values. | |
const SbVec2f & | getNormalizedPosition (const SbViewportRegion &vpRgn) const |
Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region. | |
void | setShiftDown (SbBool isDown) |
Sets whether the shift key was down when the event occurred. | |
void | setCtrlDown (SbBool isDown) |
Sets whether the CTRL key was down when the event occurred. | |
void | setAltDown (SbBool isDown) |
Sets whether the ALT key was down when the event occurred. | |
void | setButton1Down (SbBool isDown) |
Sets whether mouse Button 1 was down when the event occurred. | |
SbBool | wasShiftDown () const |
Returns true if the shift key was down when the event occurred. | |
SbBool | wasCtrlDown () const |
Returns true if the CTRL key was down when the event occurred. | |
SbBool | wasAltDown () const |
Returns true if the ALT key was down when the event occurred. | |
SbBool | wasButton1Down () const |
Returns true if mouse button 1 was down when the event occurred. | |
virtual const SbTrackerInfo * | getTrackerInfo () const |
Gets whether an event object has associated tracker information. | |
SbTrackerInfo * | getTrackerInfo () |
Gets whether an event object has associated tracker information. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Static Public Member Functions inherited from SoEvent | |
static SoType | getClassTypeId () |
Returns the type id for the SoEvent class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Base class for gesture events.
SoGestureEvent represents a series of touch events beginning with begin state and finishing with end state. It is the base class for gesture events in the Open Inventor model. Gesture events can be handled using (for example) an SoEventCallback node.
All touch events are analyzed by recognizers. When a gesture is recognized, the recognizer generates the corresponding event. This class stores the begin/delta/end state of the gesture when the event occurred.
Note:
SoEvent, SoRotateGestureEvent, SoScaleGestureEvent, SoTapGestureEvent, SoGestureRecognizer
Definition at line 84 of file SoGestureEvent.h.
The different states a gesture event can have.
Enumerator | |
---|---|
BEGIN | Begin state : Initial state. |
DELTA | Delta state : Begin event has been generated, the gesture is updated. |
END | End state : Final gesture state. |
Definition at line 91 of file SoGestureEvent.h.
SoGestureEvent::SoGestureEvent | ( | ) |
Constructor.
|
virtual |
Destructor.
|
static |
Returns the type identifier for this class.
GestureState SoGestureEvent::getGestureState | ( | ) | const |
Gets the gesture event state (Begin,Delta,End).
Use enum GestureState.
|
virtual |
Returns the type identifier for this specific instance.
Reimplemented from SoEvent.
Reimplemented in SoDoubleTapGestureEvent, SoLongTapGestureEvent, SoRotateGestureEvent, and SoScaleGestureEvent.