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

FWHID_Contact.h File Reference

FW Hand Tracking SDK -- Contacts Header. More...

#include "FWHID_HandMotion.h"

Data Structures

struct  FWHID_Contact
 Structure containing the all the information about a Contact. More...
struct  FWHID_ContactFrame
 Structure containing the all the information about a Contact frame. More...

Defines

#define kFWHID_NULL_PATH_ID   0
 path_id 0 is reserved for null, non-existent paths
#define kFWHID_MAX_iGesture_PATHS   10
 iGesture products currently use up to 10 paths
#define kFWHID_MAX_TouchStream_PATHS   24
 TouchStream products currently use up to 24 paths.
#define kFWHID_MAX_CONTACT_PATHS   32
 never expect a two-handed FingerWorks product to use > 32 paths
#define FWHID_isFinger(finger_id)   ((finger_id >= kFWHIDthumb && finger_id <= kFWHIDpinky) ?true:false)
 Tests to see if a finger_id is a finger (including thumb).
#define FWHID_isFingerNotThumb(finger_id)   ((finger_id > kFWHIDthumb && finger_id <= kFWHIDpinky) ?true:false)
 Tests to see if a finger_id is a finger (excluding thumb).
#define FWHID_isPalm(finger_id)   ((finger_id>=kFWHIDinnerPalm && finger_id <= kFWHIDforePalm3)?true:false)
 Tests to see if a finger_id is a palm.

Typedefs

typedef enum FWHIDhandID FWHIDhandID
typedef enum FWHIDfingerID FWHIDfingerID
typedef * FWHID_ContactPtr
typedef * FWHID_ContactFramePtr

Enumerations

enum  FWHIDhandID { kFWHIDleftHand = -1, kFWHIDunknownHand = 0, kFWHIDrightHand = +1 }
enum  FWHIDfingerID {
  kFWHIDunidentified = 0, kFWHIDthumb = 1, kFWHIDindex = 2, kFWHIDmiddle = 3,
  kFWHIDring = 4, kFWHIDpinky = 5, kFWHIDinnerPalm = 6, kFWHIDouterPalm = 7,
  kFWHIDforePalm0 = 8, kFWHIDforePalm1 = 9, kFWHIDforePalm2 = 10, kFWHIDforePalm3 = 11,
  kFWHIDforeArm0 = 12, kFWHIDforeArm1 = 13, kFWHIDhandCenter = 14, kFWHID_MAX_CONTACTS_PER_HAND = 15
}

Functions

int FWHID_snprintfContact (char *buf, size_t bufsize, FWHID_ContactPtr pContact)
 Converts a Contact to a string. Useful for debugging.
void FWHID_setContactCallback (FWMultiTouchDevicePtr fwdevice, FWHIDCallbackFunction fwcallback)
 Set the callback function for individual Contacts.
void FWHID_setContactFrameCallback (FWMultiTouchDevicePtr fwdevice, void *fwcallback)
 Set the callback function for when a Contact Frame is received.
void FWHID_getContactFrame (FWMultiTouchDevicePtr fwdevice, FWHID_ContactFramePtr contact_frame)
 Retrieves the current Contact frame.
int FWHID_getXpixelForScreen (FWMultiTouchDevicePtr fwdevice, FWHID_ContactPtr pContact, int max_width)
int FWHID_getYpixelForScreen (FWMultiTouchDevicePtr fwdevice, FWHID_ContactPtr pContact, int max_height)
int FWHID_getYpixelForScreenBottomOrigin (FWMultiTouchDevicePtr fwdevice, FWHID_ContactPtr pContact, int max_height)
char * FWHID_getFingerName (int finger_id)
char * FWHID_getHandName (int hand_id)


Detailed Description

FW Hand Tracking SDK -- Contacts Header.

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

Last Modified by James Orr on Mon Aug 16 2004.

Version:
1.0
Copyright (c) 2003 FingerWorks, Inc. All rights reserved.

IMPORTANT: This FingerWorks software is supplied to you by FingerWorks, Inc. ("FingerWorks") in consideration of your agreement to the following terms, and your use, installation, or modification of this FingerWorks software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install or modify this FingerWorks software.

In consideration of your agreement to abide by the following terms, and subject to these terms, FingerWorks grants you a personal, non-exclusive license, under FingerWorks's copyrights in this original FingerWorks software (the "FingerWorks Software"), to use, reproduce, and modify the FingerWorks Software for personal, academic, research, or artistic purposes. You may NOT distribute this FingerWorks Software, with or without modifications, in either source or binary form.

Neither the name, trademarks, service marks or logos of FingerWorks, Inc. may be used to endorse or promote products derived from the FingerWorks Software without specific prior written permission from FingerWorks. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by FingerWorks herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the FingerWorks Software may be incorporated.

Disclaimer: The FingerWorks Software is provided by FingerWorks on an "AS IS" basis. FINGERWORKS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE FINGERWORKS SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.

IN NO EVENT SHALL FINGERWORKS BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE FINGERWORKS SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF FINGERWORKS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Define Documentation

#define FWHID_isFinger finger_id   )     ((finger_id >= kFWHIDthumb && finger_id <= kFWHIDpinky) ?true:false)
 

Tests to see if a finger_id is a finger (including thumb).

Returns true if the finger_id is a thmub or finger.

#define FWHID_isFingerNotThumb finger_id   )     ((finger_id > kFWHIDthumb && finger_id <= kFWHIDpinky) ?true:false)
 

Tests to see if a finger_id is a finger (excluding thumb).

Returns true if the finger_id is a finger and not a thumb.

#define FWHID_isPalm finger_id   )     ((finger_id>=kFWHIDinnerPalm && finger_id <= kFWHIDforePalm3)?true:false)
 

Tests to see if a finger_id is a palm.

Returns true if the finger_id is a palm or forepalm.

#define kFWHID_MAX_CONTACT_PATHS   32
 

never expect a two-handed FingerWorks product to use > 32 paths

#define kFWHID_MAX_iGesture_PATHS   10
 

iGesture products currently use up to 10 paths

#define kFWHID_MAX_TouchStream_PATHS   24
 

TouchStream products currently use up to 24 paths.

#define kFWHID_NULL_PATH_ID   0
 

path_id 0 is reserved for null, non-existent paths

i.e. Ignore anything with path_id 0


Typedef Documentation

typedef * FWHID_ContactFramePtr
 

typedef * FWHID_ContactPtr
 

typedef enum FWHIDfingerID FWHIDfingerID
 

typedef enum FWHIDhandID FWHIDhandID
 


Enumeration Type Documentation

enum FWHIDfingerID
 

Enumeration values:
kFWHIDunidentified  Unknown Finger.
kFWHIDthumb  Thumb.
kFWHIDindex  Index Finger.
kFWHIDmiddle  Middle Finger.
kFWHIDring  Ring Finger.
kFWHIDpinky  Pinky Finger.
kFWHIDinnerPalm 
kFWHIDouterPalm 
kFWHIDforePalm0 
kFWHIDforePalm1 
kFWHIDforePalm2 
kFWHIDforePalm3 
kFWHIDforeArm0 
kFWHIDforeArm1 
kFWHIDhandCenter 
kFWHID_MAX_CONTACTS_PER_HAND  Maximum number of Contacts for a single hand.

enum FWHIDhandID
 

Enumeration values:
kFWHIDleftHand  Left Hand.
kFWHIDunknownHand  Unknown Hand.
kFWHIDrightHand  Right Hand.


Function Documentation

void FWHID_getContactFrame FWMultiTouchDevicePtr  fwdevice,
FWHID_ContactFramePtr  contact_frame
 

Retrieves the current Contact frame.

Parameters:
fwdevice device of interest
contact_frame A pointer to an allocated buffer of size sizeof(FWHID_ContactFrame).

char* FWHID_getFingerName int  finger_id  ) 
 

char* FWHID_getHandName int  hand_id  ) 
 

int FWHID_getXpixelForScreen FWMultiTouchDevicePtr  fwdevice,
FWHID_ContactPtr  pContact,
int  max_width
 

int FWHID_getYpixelForScreen FWMultiTouchDevicePtr  fwdevice,
FWHID_ContactPtr  pContact,
int  max_height
 

int FWHID_getYpixelForScreenBottomOrigin FWMultiTouchDevicePtr  fwdevice,
FWHID_ContactPtr  pContact,
int  max_height
 

void FWHID_setContactCallback FWMultiTouchDevicePtr  fwdevice,
FWHIDCallbackFunction  fwcallback
 

Set the callback function for individual Contacts.

The callback function will be called everytime a contact is received and a pointer to the contact will be the second argument in the callback function.

Parameters:
fwdevice device of interest
fwcallback function pointer of type FWHIDCallbackFunction

void FWHID_setContactFrameCallback FWMultiTouchDevicePtr  fwdevice,
void *  fwcallback
 

Set the callback function for when a Contact Frame is received.

The callback function will be called everytime a complete frame is received. To get the actual data the program should call FWHID_getContactFrame(),

Parameters:
fwdevice device of interest
fwcallback function pointer of type FWHIDCallbackFunction
See also:
FWHID_getContactFrame()

int FWHID_snprintfContact char *  buf,
size_t  bufsize,
FWHID_ContactPtr  pContact
 

Converts a Contact to a string. Useful for debugging.

Parameters:
pContact Pointer to the contact
*buf Pointer to a pre-allocated char buffer.
bufsize The size of the allocated buffer.
Returns:
The length of the string pointed to by buf.


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