Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

FWHID_Path.h File Reference

FW Hand Tracking SDK -- Paths Header.

A path stores the current trajectory of an independent finger or palm surface contact. More...

#include "FWHID_Contact.h"

Data Structures

struct  FWHID_Path
 FWHID_Path is the structure that holds all the data about a Path. More...

Typedefs

typedef * FWHID_PathPtr

Functions

void FWHID_setPathFrameCallback (FWMultiTouchDevicePtr fwdevice, FWHIDCallbackFunction fwcallback)
 Sets the Path Frame callback.
int FWHID_getPaths (FWMultiTouchDevicePtr fwdevice, FWHID_Path path_copies[kFWHID_MAX_CONTACT_PATHS])
 Retrieves a copy of the path array from the device.
FWHID_Path FWHID_getPath (FWMultiTouchDevicePtr fwdevice, int path_id)
 Accesses a certain Path from a device.
bool FWHID_isPathIdentityCurrent (FWHID_PathPtr pPath)
 Tests whether finger/hand identities have been assigned to a path and the path is active.
bool FWHID_isPathTouching (FWHID_PathPtr pPath)
 Tests whether the path has a valid contact/touch in the current image frame.
bool FWHID_isPathDebouncing (FWHID_PathPtr pPath)
 Tests whether the path is undergoing either press debounce (only been touching for one frame) or release debounce (only been lifted for one frame).
int FWHID_snprintfActivePaths (char *buf, size_t bufsize, FWMultiTouchDevicePtr fwdevice, bool contact_info_only)
 Prints description of all active (FWHID_isPathIdentityCurrent() true) paths.


Detailed Description

FW Hand Tracking SDK -- Paths Header.

A path stores the current trajectory of an independent finger or palm surface contact.

Author:
Created by Wayne Westerman on Wed Jun 25 2003.

Last Updated Wayne Westerman on Wed Dec 8 2003.

v1.53 Changed path status macros into static inline functions.

Typedef Documentation

typedef * FWHID_PathPtr
 


Function Documentation

FWHID_Path FWHID_getPath FWMultiTouchDevicePtr  fwdevice,
int  path_id
 

Accesses a certain Path from a device.

Parameters:
fwdevice the device of interest
path_id the path_id of the Path of interest
Returns:
FWHID_PathPtr to the Path requested

int FWHID_getPaths FWMultiTouchDevicePtr  fwdevice,
FWHID_Path  path_copies[kFWHID_MAX_CONTACT_PATHS]
 

Retrieves a copy of the path array from the device.

Parameters:
fwdevice the device of interest
path_copies a pre-allocated array with size sizeof(FWHID_Path)*kFWHID_MAX_CONTACT_PATHS that paths will be copied into.
Returns:
The total number of bytes actually copied. Zero or less than sizeof(FWHID_Path)*kFWHID_MAX_CONTACT_PATHS if something went wrong.

bool FWHID_isPathDebouncing FWHID_PathPtr  pPath  )  [inline, static]
 

Tests whether the path is undergoing either press debounce (only been touching for one frame) or release debounce (only been lifted for one frame).

Parameters:
pPath is type FWHID_PathPtr
Returns:
True if this is a new path's first frame of contact or if the contact has been missing for a single frame. False if the path has been either touching or lifted for more than one frame.

bool FWHID_isPathIdentityCurrent FWHID_PathPtr  pPath  )  [inline, static]
 

Tests whether finger/hand identities have been assigned to a path and the path is active.

Gesture recognition programs should use this test function to determine which paths to process or pay attention to. It ignores "noise" or "press debounce" contacts which touch for one frame only and then disappear. No finger/hand identities are assigned to such "noise" contacts.

However, it returns true during "release debounce" so that path continuity and identities are maintained should a contact disappear for one frame and then re-appear.

Parameters:
pPath is a pointer to an FWHID_Path
Returns:
true if identities are valid, false if path not yet identified or permanently lifted.

bool FWHID_isPathTouching FWHID_PathPtr  pPath  )  [inline, static]
 

Tests whether the path has a valid contact/touch in the current image frame.

Parameters:
pPath is type FWHID_PathPtr

void FWHID_setPathFrameCallback FWMultiTouchDevicePtr  fwdevice,
FWHIDCallbackFunction  fwcallback
 

Sets the Path Frame callback.

The function pointed to by fwcallback is called everytime the device pointed to by fwdevice receives a complete frame of data.

Parameters:
fwdevice The device of interest
fwcallback A pointer to a function to handle Path Frame Events for a given device

int FWHID_snprintfActivePaths char *  buf,
size_t  bufsize,
FWMultiTouchDevicePtr  fwdevice,
bool  contact_info_only
 

Prints description of all active (FWHID_isPathIdentityCurrent() true) paths.

Parameters:
buf pointer to pre-allocated character buffer that output string will be put in.
bufsize size of pre-allocated character buffer.
fwdevice pointer to multi-touch device structure
contact_info_only suppresses printing of path press-release times, frames_touching, etc.
Returns:
The length of string printed into buf.


Generated on Fri Dec 10 10:08:11 2004 for FingerWorks Hand Tracking SDK by doxygen 1.3.8