[3] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[3] | 4 | // %flair:license}
|
---|
| 5 | // created: 2013/04/03
|
---|
| 6 | // filename: VrpnObject_impl.h
|
---|
| 7 | //
|
---|
| 8 | // author: César Richard, Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: objet vrpn
|
---|
| 14 | //
|
---|
| 15 | //
|
---|
| 16 | /*********************************************************************/
|
---|
| 17 |
|
---|
| 18 | #ifndef VRPNOBJECT_IMPL_H
|
---|
| 19 | #define VRPNOBJECT_IMPL_H
|
---|
[15] | 20 |
|
---|
[3] | 21 | #include <IODevice.h>
|
---|
| 22 | #include <string>
|
---|
| 23 | #include <stdint.h>
|
---|
| 24 | #include <vrpn_Tracker.h>
|
---|
| 25 | #include "Quaternion.h"
|
---|
[167] | 26 | #include "Vector3D.h"
|
---|
[3] | 27 |
|
---|
[15] | 28 | namespace flair {
|
---|
[122] | 29 | namespace core {
|
---|
[214] | 30 | class Matrix;
|
---|
[122] | 31 | }
|
---|
| 32 | namespace gui {
|
---|
| 33 | class TabWidget;
|
---|
| 34 | class Tab;
|
---|
| 35 | class DataPlot1D;
|
---|
| 36 | }
|
---|
| 37 | namespace sensor {
|
---|
| 38 | class VrpnClient;
|
---|
| 39 | class VrpnObject;
|
---|
| 40 | }
|
---|
[3] | 41 | }
|
---|
| 42 |
|
---|
[15] | 43 | class VrpnObject_impl {
|
---|
| 44 | friend class VrpnClient_impl;
|
---|
[3] | 45 |
|
---|
[15] | 46 | public:
|
---|
| 47 | VrpnObject_impl(flair::sensor::VrpnObject *self,
|
---|
[122] | 48 | std::string name,
|
---|
[286] | 49 | int id, const flair::gui::TabWidget *tab,flair::sensor::VrpnClient *client);
|
---|
[15] | 50 | ~VrpnObject_impl(void);
|
---|
[3] | 51 |
|
---|
[15] | 52 | void GetQuaternion(flair::core::Quaternion &quaternion);
|
---|
[167] | 53 | void GetPosition(flair::core::Vector3Df &point);
|
---|
[15] | 54 | bool IsTracked(unsigned int timeout_ms);
|
---|
[3] | 55 |
|
---|
[15] | 56 | flair::gui::Tab *plot_tab;
|
---|
| 57 | flair::gui::DataPlot1D *x_plot;
|
---|
| 58 | flair::gui::DataPlot1D *y_plot;
|
---|
| 59 | flair::gui::DataPlot1D *z_plot;
|
---|
[214] | 60 | flair::core::Matrix *output, *state;
|
---|
[3] | 61 |
|
---|
[15] | 62 | static void VRPN_CALLBACK handle_pos(void *userdata, const vrpn_TRACKERCB t);
|
---|
| 63 |
|
---|
| 64 | private:
|
---|
| 65 | flair::sensor::VrpnObject *self;
|
---|
| 66 | const flair::sensor::VrpnClient *parent;
|
---|
| 67 | vrpn_Tracker_Remote *tracker;
|
---|
| 68 | void Update(void);
|
---|
[223] | 69 | flair::core::Time previousTime;
|
---|
[15] | 70 | };
|
---|
| 71 |
|
---|
| 72 | #endif // VRPNOBJECT_IMPL_H
|
---|