Equalizer 1.0
|
Public Member Functions | |
Tracker () | |
Constructs a new Tracker and sets it's _running state to false. | |
bool | init (const std::string &port) |
Configures the serial port and initialises the tracker. | |
void | setWorldToEmitter (const eq::Matrix4f &matrix) |
Set the matrix defining the transformation from world coordinates to emitter coordinates. | |
void | setSensorToObject (const eq::Matrix4f &matrix) |
Set the matrix defining the transformation from sensor coordinates to coordinates of the tracked object. | |
bool | isRunning () const |
Checks if the tracker is running. | |
bool | update () |
Gets new position and orientation data from the tracker and stores them in the _pos and _hpr arrays. | |
const eq::Matrix4f & | getMatrix () const |
Gets the transformation matrix with the position and orientation data. |
Definition at line 36 of file osgScaleViewer/tracker.h.
const eq::Matrix4f& Tracker::getMatrix | ( | ) | const [inline] |
Gets the transformation matrix with the position and orientation data.
This function will not communicate with the tracker,.
Definition at line 100 of file osgScaleViewer/tracker.h.
Referenced by osgScaleViewer::Config::startFrame().
bool Tracker::init | ( | const std::string & | port | ) |
Configures the serial port and initialises the tracker.
Sets the _running state to true if the initialisation is successful.
port | the used serial port. |
true
if the tracker works correctly, false
otherwise. Definition at line 51 of file osgScaleViewer/tracker.cpp.
References EQERROR, and co::base::sysError().
Referenced by osgScaleViewer::Config::init().
bool Tracker::isRunning | ( | ) | const [inline] |
Checks if the tracker is running.
true
if the tracker is ready, false
otherwise. Definition at line 79 of file osgScaleViewer/tracker.h.
Referenced by osgScaleViewer::Config::startFrame().
void Tracker::setSensorToObject | ( | const eq::Matrix4f & | matrix | ) | [inline] |
Set the matrix defining the transformation from sensor coordinates to coordinates of the tracked object.
matrix | the sensor to object matrix. |
Definition at line 70 of file osgScaleViewer/tracker.h.
Referenced by osgScaleViewer::Config::init().
void Tracker::setWorldToEmitter | ( | const eq::Matrix4f & | matrix | ) | [inline] |
Set the matrix defining the transformation from world coordinates to emitter coordinates.
matrix | the world to emitter matrix. |
Definition at line 61 of file osgScaleViewer/tracker.h.
Referenced by osgScaleViewer::Config::init().
bool Tracker::update | ( | ) |
Gets new position and orientation data from the tracker and stores them in the _pos and _hpr arrays.
For a successful update, _running must be true.
true
if the data transfer is successful, false
otherwise. Definition at line 124 of file osgScaleViewer/tracker.cpp.
References EQERROR.
Referenced by osgScaleViewer::Config::startFrame().