The SwipeManager class inherits from GestureManager to implement a hand swiping gesture.
More...
#include <swipemanager.h>
The SwipeManager class inherits from GestureManager to implement a hand swiping gesture.
When the gesture is detected it provides the IOEventManager the top center position of the hand as mouse position and the distance between the hand position in the current frame and the hand posistion from the previous frame
SwipeManager::SwipeManager |
( |
| ) |
|
void SwipeManager::generateGestureData |
( |
FrameData & |
params | ) |
|
|
virtual |
bool SwipeManager::isGestureDetected |
( |
FrameData & |
params | ) |
|
|
virtual |
isGestureDetected determines whether the gesutre has been detected or not
- Parameters
-
params | data of the frame needed for the gesture |
- Returns
- true if only one hand is detected with at least more than one fingertip or a palm
Implements GestureManager.
void SwipeManager::onStatusActive |
( |
FrameData & |
params | ) |
|
|
virtual |
onStatusActive This function is called while the status is active, until the end counter reaches 0
- Parameters
-
params | data of the frame needed for the gesture |
Note that the status can be active serveral frames so this function is going to be called several times in a row.
Implements GestureManager.
void SwipeManager::onStatusFinish |
( |
FrameData & |
params | ) |
|
|
virtual |
onStatusFinish This function is called when the end counter reaches 0
- Parameters
-
params | data of the frame needed for the gesture |
After this function is called the state of the gesutre is going to be set as inactive. The function should not be called again until the status of the gesture has gone to active again.
Implements GestureManager.
void SwipeManager::onStatusInactive |
( |
FrameData & |
params | ) |
|
|
virtual |
onStatusInactive This function is called when the status is set to inactive
- Parameters
-
params | data of the frame needed for the gestures |
In case a gesture needs passive information this is the function where it should be recorded.
Implements GestureManager.
void SwipeManager::onStatusInit |
( |
FrameData & |
params | ) |
|
|
virtual |
onStatusInit This function is called the first time the init counter reaches 0
- Parameters
-
params | data of the frame needed for the gesture |
After this function is called the state of the gesture is going to be set as active. The function should not be called again until the status of the gesture has gone to inactive again.
In this function all the atributes that are going to be needed during the gesture should be initialized.
Implements GestureManager.
Point2i SwipeManager::centroidHand |
|
protected |
bool SwipeManager::isClicked |
|
protected |
Point2i SwipeManager::prevCentroidHand |
|
protected |
The documentation for this class was generated from the following files: