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

VirtualMarker represents single tracked marker. More...

#include <MultiWidgets/VirtualInput.hpp>

Inheritance diagram for MultiWidgets::VirtualMarker:
MultiWidgets::VirtualObject

Public Member Functions

uint64_t code () const
 Code of the marker. More...
 
virtual void injectToSamples (MultiTouch::Screen &touchScreen, int sampleBegin, int sampleEnd)
 Injects the marker to the samples of given touchscreen. More...
 
float rotation () const
 Rotation of the marker. More...
 
void setRotation (float rotation)
 Sets the rotation for the marker. More...
 
virtual VirtualInputType type () const
 Enum for the type of the marker. More...
 
 VirtualMarker (Nimble::Vector2f location, uint64_t code)
 Constructs new virtual marker with given code and proper id. More...
 
 VirtualMarker (Nimble::Vector2f location, uint64_t code, long id)
 Constructs new virtual marker with given code and 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

VirtualMarker represents single tracked marker.

It is used for generating artificial marker input data.

Constructor & Destructor Documentation

MultiWidgets::VirtualMarker::VirtualMarker ( Nimble::Vector2f  location,
uint64_t  code 
)

Constructs new virtual marker with given code and proper id.

Parameters
locationLocation where the object is placed
codeCode for the marker
MultiWidgets::VirtualMarker::VirtualMarker ( Nimble::Vector2f  location,
uint64_t  code,
long  id 
)

Constructs new virtual marker with given code and id.

Parameters
locationLocation where the object is placed
codeCode for the marker
idId for the marker

Member Function Documentation

uint64_t MultiWidgets::VirtualMarker::code ( ) const

Code of the marker.

Returns
Code of the marker
virtual void MultiWidgets::VirtualMarker::injectToSamples ( MultiTouch::Screen touchScreen,
int  sampleBegin,
int  sampleEnd 
)
virtual

Injects the marker 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.

float MultiWidgets::VirtualMarker::rotation ( ) const

Rotation of the marker.

Returns
Rotation of the marker
void MultiWidgets::VirtualMarker::setRotation ( float  rotation)

Sets the rotation for the marker.

Parameters
Rotationof the marker
virtual VirtualInputType MultiWidgets::VirtualMarker::type ( ) const
virtual

Enum for the type of the marker.

Returns
VirtualInputType::VIRTUAL_INPUT_MARKER

Implements MultiWidgets::VirtualObject.