source: flair-src/trunk/lib/FlairSensorActuator/src/unexported/VrpnObject_impl.h@ 136

Last change on this file since 136 was 135, checked in by Sanahuja Guillaume, 7 years ago

VrpnObject no longer outputs Euler (ony Quaternion): warning, output matrix has changed!

File size: 1.6 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
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
20
21#include <IODevice.h>
22#include <string>
23#include <stdint.h>
24#include <vrpn_Tracker.h>
25#include "Quaternion.h"
26
27namespace flair {
28 namespace core {
29 class cvmatrix;
30 class Vector3D;
31 }
32 namespace gui {
33 class TabWidget;
34 class Tab;
35 class DataPlot1D;
36 }
37 namespace sensor {
38 class VrpnClient;
39 class VrpnObject;
40 }
41}
42
43class VrpnObject_impl {
44 friend class VrpnClient_impl;
45
46public:
47 VrpnObject_impl(flair::sensor::VrpnObject *self,
48 std::string name,
49 int id, const flair::gui::TabWidget *tab);
50 ~VrpnObject_impl(void);
51
52 void mainloop(void);
53 void GetQuaternion(flair::core::Quaternion &quaternion);
54 void GetPosition(flair::core::Vector3D &point);
55 bool IsTracked(unsigned int timeout_ms);
56
57 flair::gui::Tab *plot_tab;
58 flair::gui::DataPlot1D *x_plot;
59 flair::gui::DataPlot1D *y_plot;
60 flair::gui::DataPlot1D *z_plot;
61 flair::core::cvmatrix *output, *state;
62
63 static void VRPN_CALLBACK handle_pos(void *userdata, const vrpn_TRACKERCB t);
64
65private:
66 flair::sensor::VrpnObject *self;
67 const flair::sensor::VrpnClient *parent;
68 vrpn_Tracker_Remote *tracker;
69 void Update(void);
70};
71
72#endif // VRPNOBJECT_IMPL_H
Note: See TracBrowser for help on using the repository browser.