Vision Touch Surface Library
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
SwipeManager Class Reference

The SwipeManager class inherits from GestureManager to implement a hand swiping gesture. More...

#include <swipemanager.h>

Inheritance diagram for SwipeManager:
Inheritance graph
[legend]
Collaboration diagram for SwipeManager:
Collaboration graph
[legend]

Public Member Functions

 SwipeManager ()
 
virtual bool isGestureDetected (FrameData &params)
 isGestureDetected determines whether the gesutre has been detected or not More...
 
virtual void generateGestureData (FrameData &params)
 generateGestureData This function generates the data needed for the gesture manager More...
 
virtual void onStatusInit (FrameData &params)
 onStatusInit This function is called the first time the init counter reaches 0 More...
 
virtual void onStatusActive (FrameData &params)
 onStatusActive This function is called while the status is active, until the end counter reaches 0 More...
 
virtual void onStatusFinish (FrameData &params)
 onStatusFinish This function is called when the end counter reaches 0 More...
 
virtual void onStatusInactive (FrameData &params)
 onStatusInactive This function is called when the status is set to inactive More...
 
- Public Member Functions inherited from GestureManager
 GestureManager ()
 
 ~GestureManager ()
 
virtual void updateStatus (FrameData &params)
 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 IOEventManagergetIOManager ()
 
virtual bool isActive () const
 
int getCounterInitMax () const
 
void setCounterInitMax (int value)
 
int getCounterEndMax () const
 
void setCounterEndMax (int value)
 

Protected Attributes

bool isClicked
 
Point2i prevCentroidHand
 
KalmanFilteringSwipe kmSwipe
 
Point2i centroidHand
 
- Protected Attributes inherited from GestureManager
int counterInit
 
int counterEnd
 
int counterInitMax
 
int counterEndMax
 
IOEventManageriomanager
 
bool gestureDetected
 
boost::mutex iomanagerMutex
 

Additional Inherited Members

- Protected Member Functions inherited from GestureManager
virtual void resetInitCounter ()
 
virtual void resetEndCounter ()
 
- Static Protected Attributes inherited from GestureManager
static const int STATUS_ACTIVE =0
 
static const int STATUS_INACTIVE =-2
 
static const int STATUS_INIT =-1
 
static const int STATUS_FINISH =1
 

Detailed Description

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

Constructor & Destructor Documentation

SwipeManager::SwipeManager ( )

Member Function Documentation

void SwipeManager::generateGestureData ( FrameData params)
virtual

generateGestureData This function generates the data needed for the gesture manager

Parameters
paramsdata 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.

bool SwipeManager::isGestureDetected ( FrameData params)
virtual

isGestureDetected determines whether the gesutre has been detected or not

Parameters
paramsdata 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
paramsdata 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
paramsdata 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
paramsdata 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
paramsdata 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.

Member Data Documentation

Point2i SwipeManager::centroidHand
protected
bool SwipeManager::isClicked
protected
KalmanFilteringSwipe SwipeManager::kmSwipe
protected
Point2i SwipeManager::prevCentroidHand
protected

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