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

Base class for different markers. More...

#include <MultiTouch/MultiTouch.hpp>

Public Member Functions

int age () const
 Get the age of the marker in samples. More...
 
Nimble::Vector2f centerLocation () const
 Get the center of the marker, in screen coordinates. More...
 
uint64_t code () const
 Get the marker code value. More...
 
TrackedObject::Id id () const
 Get the id of the marker. More...
 
bool isNull () const
 Checks if this marker is null. More...
 
 Marker (const MarkerData *self=0)
 Constructs a marker. More...
 
bool operator< (const Marker &p) const
 Compare marker order. More...
 
bool operator== (const Marker &p) const
 Compare markers for equality. More...
 
float rotation () const
 Get marker rotation in radians, range 0 - 2PI. More...
 
QString type () const
 Returns the marker type. More...
 
 ~Marker ()
 Destructor.
 

Friends

class TrackedObject
 

Detailed Description

Base class for different markers.

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

Examples:
MarkerExample.cpp.

Constructor & Destructor Documentation

MultiTouch::Marker::Marker ( const MarkerData *  self = 0)
inline

Constructs a marker.

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

Member Function Documentation

int MultiTouch::Marker::age ( ) const

Get the age of the marker in samples.

Returns
marker age in samples
Nimble::Vector2f MultiTouch::Marker::centerLocation ( ) const

Get the center of the marker, in screen coordinates.

Returns
marker center location
uint64_t MultiTouch::Marker::code ( ) const

Get the marker code value.

Returns the code that the marker represents.

Returns
the marker code
TrackedObject::Id MultiTouch::Marker::id ( ) const

Get the id of the marker.

Returns the unique id assigned by the tracker to the marker.

Returns
id of the marker
See Also
code
bool MultiTouch::Marker::isNull ( ) const
inline

Checks if this marker is null.

Returns
true if the marker data is null; otherwise false
bool MultiTouch::Marker::operator< ( const Marker p) const
inline

Compare marker order.

Markers are ordered by their ids.

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

Compare markers for equality.

Two markers are equal if their ids are the same.

Parameters
pmarker to compare
Returns
true if marker ids are equal; otherwise false
float MultiTouch::Marker::rotation ( ) const

Get marker rotation in radians, range 0 - 2PI.

Returns
marker rotation in radians
QString MultiTouch::Marker::type ( ) const

Returns the marker type.

Returns
marker type