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

VirtualPen represents single tracked pen. More...

#include <MultiWidgets/VirtualInput.hpp>

Inheritance diagram for MultiWidgets::VirtualPen:
MultiWidgets::VirtualObject

Public Member Functions

virtual void injectToSamples (MultiTouch::Screen &touchScreen, int sampleBegin, int sampleEnd)
 Injects the pen to the samples of given touchscreen. More...
 
virtual VirtualInputType type () const
 Enum for the type of the pen. More...
 
 VirtualPen (Nimble::Vector2f loc)
 Constructs new virtual pen with proper id. More...
 
 VirtualPen (Nimble::Vector2f loc, long id)
 Constructs new virtual pen with given id. 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.
 

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

VirtualPen represents single tracked pen.

It is used for generating artificial pen input data.

Constructor & Destructor Documentation

MultiWidgets::VirtualPen::VirtualPen ( Nimble::Vector2f  loc)
explicit

Constructs new virtual pen with proper id.

Parameters
locLocation where the object is placed
MultiWidgets::VirtualPen::VirtualPen ( Nimble::Vector2f  loc,
long  id 
)

Constructs new virtual pen with given id.

Parameters
locLocation where the object is placed
idId for the virtual object

Member Function Documentation

virtual void MultiWidgets::VirtualPen::injectToSamples ( MultiTouch::Screen touchScreen,
int  sampleBegin,
int  sampleEnd 
)
virtual

Injects the pen to the samples of given touchscreen.

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.

virtual VirtualInputType MultiWidgets::VirtualPen::type ( ) const
virtual

Enum for the type of the pen.

Returns
VirtualInputType::VIRTUAL_INPUT_PEN

Implements MultiWidgets::VirtualObject.