A fully processed sample from the computer vision component.
More...
#include <MultiTouch/MultiTouch.hpp>
A fully processed sample from the computer vision component.
A sample contains all the fingers, hands markers and pens that could be seen with the multiple cameras during one frame. The MultiTouch::Hand, MultiTouch::Finger, MultiTouch::Marker and MultiTouch::Pen objects that are returned by the sample are valid until the next time the Screen::update function is called. After the update call, you should reload all of the objects, since their validity is no longer guaranteed.
| MultiTouch::Sample::Sample |
( |
__Sample * |
self = 0 | ) |
|
|
inline |
Constructs a sample.
- Parameters
-
| self | Data for constructing the sample |
| const std::shared_ptr<MultiTouch::CVResults> MultiTouch::Sample::findCVResults |
( |
const QString & |
type | ) |
const |
Gets a handle to some CVExtension results.
This method is used to gain access to the results that the CVResults objects encapsulate (which have been originally calculated by CVExtension objects).
- Parameters
-
| type | CV extension type whose results to query |
- Returns
- result for the matching CV extension or null if no match is found
Finds a finger with a given id.
If the sample does not contain a finger with the given id, then a null finger is returned, see Finger::isNull.
- Parameters
-
- Returns
- finger with the matching id or null finger
Finds a hand with the given id.
If the sample does not contain a hand with the given id, then a null hand is returned, see Hand::isNull.
- Parameters
-
- Returns
- hand with the matching the id or null hand
Finds a marker, based on its id If the sample does not contain a marker with the given id, then a null marker is returned, see Marker::isNull.
- Parameters
-
| id | marker id to search for |
- Returns
- marker with the matching id or null marker
Find a pen by its id.
- Parameters
-
- Returns
- pen with the given id or null pen if not found
Find a tracked object by its id.
- Parameters
-
- Returns
- tracked object or null object if not found
Returns the nth finger.
Returns null finger if given index is too large.
- See Also
- Finger::isNull
- Parameters
-
- Returns
- finger with the given index
| size_t MultiTouch::Sample::fingerCount |
( |
| ) |
const |
Returns the number of fingers.
- Returns
- number of fingers in the sample
Returns the nth hand.
- Parameters
-
- Returns
- hand with the given index
| size_t MultiTouch::Sample::handCount |
( |
| ) |
const |
Returns the number of hands.
- Returns
- number of hands in the sample
| int MultiTouch::Sample::index |
( |
| ) |
const |
Returns the index of this sample that is monotonically increasing and unique for each sample.
- Returns
- Sample index
| bool MultiTouch::Sample::isNull |
( |
| ) |
const |
|
inline |
Check if the sample is invalid.
- Returns
- true if the data is null; otherwise false
Returns the nth marker.
- Parameters
-
- Returns
- marker with the given index
| size_t MultiTouch::Sample::markerCount |
( |
| ) |
const |
Returns the number of markers.
- Returns
- number of markers in the sample
Return the nth pen.
- Parameters
-
- Returns
- pen with the given index
| size_t MultiTouch::Sample::penCount |
( |
| ) |
const |
Returns the number of pens in the sample.
- Returns
- number of markers in the sample
Return the nth tracked object.
Returns null object if given index is too large.
- Parameters
-
- Returns
- nth tracked object
| size_t MultiTouch::Sample::trackedObjectCount |
( |
| ) |
const |
Return the number of tracked objects in the sample.
- Returns
- number of tracked objects
| void MultiTouch::Sample::write |
( |
FILE * |
f | ) |
const |
Writes the contents of this sample to the file.
- Parameters
-
Writes the contents of this sample to data buffer.
This function is mostly for internal use and is used to support network bridging.
- Parameters
-
| bd | This sample is written into this object |
| version | protocol version |