All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiWidgets::VirtualFinger Class Reference

VirtualFinger represents single tracked finger. More...

#include <MultiWidgets/VirtualInput.hpp>

Inheritance diagram for MultiWidgets::VirtualFinger:
MultiWidgets::VirtualObject

Public Member Functions

Nimble::Vector2f direction () const
 Returns the direction of the finger. More...
 
VirtualHandhand ()
 Returns the reference to the hand that owns this finger. More...
 
virtual void injectToSamples (MultiTouch::Screen &touchScreen, int sampleBegin, int sampleEnd)
 Injects this finger to the given sample. More...
 
void setDirection (Nimble::Vector2f dir)
 Sets the direction of the finger. More...
 
virtual VirtualInputType type () const
 Enum for the type of the finger. More...
 
- Public Member Functions inherited from MultiWidgets::VirtualObject
int age () const
 Age (number of frames detected) of object. More...
 
long id () const
 Id of the virtual object. More...
 
Nimble::Vector2f location () const
 Location of the object, that is only updated using setLocation. More...
 
virtual void move (Nimble::Vector2f d)
 Moves object by given vector. More...
 
Nimble::Vector2f previousLocation () const
 Returns the previous location of the object. More...
 
void setLocation (Nimble::Vector2f location)
 Sets the location of the object. More...
 
 VirtualObject (Nimble::Vector2f loc)
 Constructs new virtual object with proper id. More...
 
 VirtualObject (long id, Nimble::Vector2 loc)
 Constructs new virtual object with given id. More...
 
virtual ~VirtualObject ()
 Destructor.
 

Friends

class VirtualHand
 

Additional Inherited Members

- Protected Member Functions inherited from MultiWidgets::VirtualObject
void increaseAge (int frames=1)
 Increases the age of the virtual object. More...
 
void setPreviousLocation (Nimble::Vector2f loc)
 Sets the previous location of the object. More...
 

Detailed Description

VirtualFinger represents single tracked finger.

It is always owned by the hand that it belongs to and can only be created and accessed by instances of VirtualHand.

Member Function Documentation

Nimble::Vector2f MultiWidgets::VirtualFinger::direction ( ) const

Returns the direction of the finger.

Returns
Direction of the finger
See Also
setDirection
VirtualHand& MultiWidgets::VirtualFinger::hand ( )

Returns the reference to the hand that owns this finger.

Returns
Reference to hand owning this finger
virtual void MultiWidgets::VirtualFinger::injectToSamples ( MultiTouch::Screen touchScreen,
int  sampleBegin,
int  sampleEnd 
)
virtual

Injects this finger to the given sample.

Note
VirtualHand that owns this finger calls this function in its injectToSamples so there rarely is need to call this explicitly.
Parameters
touchScreenThe synthesized input is injected to this touchscreen's samples
sampleBeginIndex of the first sample to handle
sampleEndIndex of the last sample (inclusive) to handle
See Also
VirtualObject::injectToSamples

Implements MultiWidgets::VirtualObject.

void MultiWidgets::VirtualFinger::setDirection ( Nimble::Vector2f  dir)

Sets the direction of the finger.

Parameters
dirDirection of the finger
See Also
direction
virtual VirtualInputType MultiWidgets::VirtualFinger::type ( ) const
virtual

Enum for the type of the finger.

Returns
VirtualInputType::VIRTUAL_INPUT_FINGER

Implements MultiWidgets::VirtualObject.