The DoubleSwipeManager class inherits from GestureManager to implement a double handed gesture. More...
#include <doubleswipemanager.h>
Public Member Functions | |
DoubleSwipeManager () | |
virtual bool | isGestureDetected (FrameData ¶ms) |
isGestureDetected determines whether the gesutre has been detected or not More... | |
virtual void | generateGestureData (FrameData ¶ms) |
generateGestureData This function generates the data needed for the gesture manager More... | |
virtual void | onStatusInit (FrameData ¶ms) |
onStatusInit This function is called the first time the init counter reaches 0 More... | |
virtual void | onStatusActive (FrameData ¶ms) |
onStatusActive This function is called while the status is active, until the end counter reaches 0 More... | |
virtual void | onStatusFinish (FrameData ¶ms) |
onStatusFinish This function is called when the end counter reaches 0 More... | |
virtual void | onStatusInactive (FrameData ¶ms) |
onStatusInactive This function is called when the status is set to inactive More... | |
![]() | |
GestureManager () | |
~GestureManager () | |
virtual void | updateStatus (FrameData ¶ms) |
updateStatus processes the data of the given frame More... | |
virtual void | setIOManager (IOEventManager *eventManager) |
setIOManager This function changes the event manager associated with this class More... | |
virtual IOEventManager * | getIOManager () |
virtual bool | isActive () const |
int | getCounterInitMax () const |
void | setCounterInitMax (int value) |
int | getCounterEndMax () const |
void | setCounterEndMax (int value) |
Additional Inherited Members | |
![]() | |
virtual void | resetInitCounter () |
virtual void | resetEndCounter () |
![]() | |
int | counterInit |
int | counterEnd |
int | counterInitMax |
int | counterEndMax |
IOEventManager * | iomanager |
bool | gestureDetected |
boost::mutex | iomanagerMutex |
![]() | |
static const int | STATUS_ACTIVE =0 |
static const int | STATUS_INACTIVE =-2 |
static const int | STATUS_INIT =-1 |
static const int | STATUS_FINISH =1 |
The DoubleSwipeManager class inherits from GestureManager to implement a double handed gesture.
When the gesture is detected it provides the centroid of both hands as the mouse position and the offset variable is set with the diference of distances between the hands at the current frame with the hands from the previous frame.
DoubleSwipeManager::DoubleSwipeManager | ( | ) |
|
virtual |
generateGestureData This function generates the data needed for the gesture manager
params | data of the frame needed for the gesture |
This function is called every time that GestureManager::updateStatus is called and GestureManager::isGestureDetected returns True
Implements GestureManager.
|
virtual |
isGestureDetected determines whether the gesutre has been detected or not
params | data of the frame needed for the gesture |
Implements GestureManager.
|
virtual |
onStatusActive This function is called while the status is active, until the end counter reaches 0
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.
|
virtual |
onStatusFinish This function is called when the end counter reaches 0
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.
|
virtual |
onStatusInactive This function is called when the status is set to inactive
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.
|
virtual |
onStatusInit This function is called the first time the init counter reaches 0
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.