This class represents a pen.
More...
#include <MultiTouch/MultiTouch.hpp>
This class represents a pen.
One should not store these in widgets etc, because this is a proxy object for the actual data laying inside tracker.
- Examples:
- PenExample.cpp.
| MultiTouch::Pen::Pen |
( |
const PenData * |
self = 0 | ) |
|
|
inline |
Constrct a new pen.
- Parameters
-
| self | Data to represent with this pen. If none given object will be null. |
| int MultiTouch::Pen::age |
( |
| ) |
const |
The age of pen (the number of frames it has been around).
- Returns
- age of the pen in samples
Get the id of the pen.
- Returns
- id for of this pen
| bool MultiTouch::Pen::isNull |
( |
| ) |
|
|
inline |
Check if the pen is null.
- Returns
- true if the pen data is null; otherwise false
Get the location of the pen.
- Returns
- pen location
| bool MultiTouch::Pen::operator< |
( |
const Pen & |
p | ) |
const |
|
inline |
Compare the order of pens.
Pens are sorted by their id.
- Parameters
-
- Returns
- true if id of this is less than p's id
| bool MultiTouch::Pen::operator== |
( |
const Pen & |
p | ) |
const |
|
inline |
Compare pen equality.
Pens are equal if their ids are the same.
- Parameters
-
- Returns
- true if the pen ids are equal; otherwise false