All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiTouch::Finger Class Reference

A class that represents a single finger. More...

#include <MultiTouch/MultiTouch.hpp>

Public Member Functions

int age () const
 The age of the fingertip (the number of frames it has been around). More...
 
 Finger (const __Finger *self=0)
 Constructs a marker. More...
 
TrackedObject::Id handId () const
 Return the id of the hand this finger belongs to. More...
 
TrackedObject::Id id () const
 The unique id for this contact. More...
 
Nimble::Vector2f initTipLocation () const
 The location of the fingertip when it was first seen. More...
 
bool isNull () const
 Check if the finger is null. More...
 
bool isVirtual () const
 Check if the object is a virtual object. More...
 
bool operator< (const Finger &p) const
 Compare the order of fingers. More...
 
bool operator== (const Finger &p) const
 Compare finger equality. More...
 
Nimble::Vector2f prevTipLocation () const
 The location of the fingertip in the previous frame. More...
 
Nimble::Vector2f tipDirection () const
 This function returns the direction of the finger (at tip) towards the palm. More...
 
Nimble::Vector2f tipLocation () const
 The location of the fingertip. More...
 
Nimble::Vector2f tipMotion () const
 The amount of motion since the previous frame. More...
 
float trackingQuality () const
 Indication of how well the computer vision sees the finger A value close to zero indicates that the system has trouble determining the location of the finger. More...
 
void write (FILE *f) const
 Writes the contents of this finger to the file. More...
 
 ~Finger ()
 Destructor.
 

Friends

class Hand
 
class TrackedObject
 

Detailed Description

A class that represents a single finger.

One should not store these in widgets etc, because this is a proxy object for the actual data laying inside tracker.

Constructor & Destructor Documentation

MultiTouch::Finger::Finger ( const __Finger *  self = 0)
inline

Constructs a marker.

Parameters
selfData to represent with this finger. If none given object will be null.

Member Function Documentation

int MultiTouch::Finger::age ( ) const

The age of the fingertip (the number of frames it has been around).

Returns
finger age in samples
TrackedObject::Id MultiTouch::Finger::handId ( ) const

Return the id of the hand this finger belongs to.

Returns
hand id
TrackedObject::Id MultiTouch::Finger::id ( ) const

The unique id for this contact.

The id counter begins from zero and increases monotonically (unless the finger was generated with Screen::synthesizeFingerInput).

Returns
id for the contact
Nimble::Vector2f MultiTouch::Finger::initTipLocation ( ) const

The location of the fingertip when it was first seen.

Returns
initial finger location
bool MultiTouch::Finger::isNull ( ) const
inline

Check if the finger is null.

Returns
true if the finger contains no data
bool MultiTouch::Finger::isVirtual ( ) const

Check if the object is a virtual object.

Virtual objects are generated manually by the user and not by the tracker.

Returns
true if the object was generated by the user; otherwise false
bool MultiTouch::Finger::operator< ( const Finger p) const
inline

Compare the order of fingers.

Fingers are sorted by their id.

Parameters
pfinger to compare
Returns
true if id of this is less than p's id
bool MultiTouch::Finger::operator== ( const Finger p) const
inline

Compare finger equality.

Fingers are equal if their ids are the same.

Parameters
pfinger to compare
Returns
true if the finger ids are equal; otherwise false
Nimble::Vector2f MultiTouch::Finger::prevTipLocation ( ) const

The location of the fingertip in the previous frame.

Returns
finger location in previous frame
Nimble::Vector2f MultiTouch::Finger::tipDirection ( ) const

This function returns the direction of the finger (at tip) towards the palm.

Returns
direction of the finger
Nimble::Vector2f MultiTouch::Finger::tipLocation ( ) const

The location of the fingertip.

Returns
finger location
Nimble::Vector2f MultiTouch::Finger::tipMotion ( ) const

The amount of motion since the previous frame.

Returns the motion of the finger tip compared to previous sample. This is basically the difference between tip locations of current and previous frame.

Returns
motion of the finger tip from previous sample
float MultiTouch::Finger::trackingQuality ( ) const

Indication of how well the computer vision sees the finger A value close to zero indicates that the system has trouble determining the location of the finger.

A value close to 1 indicates that the system is confident of its location estimation. CURRENTLY NOT USED!

Returns
tracking quality
void MultiTouch::Finger::write ( FILE *  f) const

Writes the contents of this finger to the file.

Parameters
fFile to write