Changeset 15 in flair-src for trunk/lib/FlairSensorActuator/src/unexported/VrpnObject_impl.h
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/unexported/VrpnObject_impl.h
r3 r15 25 25 #include "Quaternion.h" 26 26 27 namespace flair 28 { 29 namespace core 30 { 31 class cvmatrix; 32 class Vector3D; 33 class Euler; 34 } 35 namespace gui 36 { 37 class TabWidget; 38 class Tab; 39 class DataPlot1D; 40 } 41 namespace sensor 42 { 43 class VrpnClient; 44 class VrpnObject; 45 } 27 namespace flair { 28 namespace core { 29 class cvmatrix; 30 class Vector3D; 31 class Euler; 32 } 33 namespace gui { 34 class TabWidget; 35 class Tab; 36 class DataPlot1D; 37 } 38 namespace sensor { 39 class VrpnClient; 40 class VrpnObject; 41 } 46 42 } 47 43 48 class VrpnObject_impl 49 { 50 friend class VrpnClient_impl; 44 class VrpnObject_impl { 45 friend class VrpnClient_impl; 51 46 52 public: 53 VrpnObject_impl(flair::sensor::VrpnObject* self,const flair::sensor::VrpnClient *parent,std::string name,int id,const flair::gui::TabWidget* tab); 54 ~VrpnObject_impl(void); 47 public: 48 VrpnObject_impl(flair::sensor::VrpnObject *self, 49 const flair::sensor::VrpnClient *parent, std::string name, 50 int id, const flair::gui::TabWidget *tab); 51 ~VrpnObject_impl(void); 55 52 56 57 58 59 60 53 void mainloop(void); 54 void GetEuler(flair::core::Euler &euler); 55 void GetQuaternion(flair::core::Quaternion &quaternion); 56 void GetPosition(flair::core::Vector3D &point); 57 bool IsTracked(unsigned int timeout_ms); 61 58 62 flair::gui::Tab*plot_tab;63 flair::gui::DataPlot1D*x_plot;64 flair::gui::DataPlot1D*y_plot;65 flair::gui::DataPlot1D*z_plot;66 flair::core::cvmatrix *output,*state;59 flair::gui::Tab *plot_tab; 60 flair::gui::DataPlot1D *x_plot; 61 flair::gui::DataPlot1D *y_plot; 62 flair::gui::DataPlot1D *z_plot; 63 flair::core::cvmatrix *output, *state; 67 64 68 static voidVRPN_CALLBACK handle_pos(void *userdata, const vrpn_TRACKERCB t);65 static void VRPN_CALLBACK handle_pos(void *userdata, const vrpn_TRACKERCB t); 69 66 70 private: 71 flair::sensor::VrpnObject* self; 72 const flair::sensor::VrpnClient *parent; 73 vrpn_Tracker_Remote* tracker; 74 flair::core::Quaternion quaternion;//todo: quaternion should be included in the output to replace euler angles 75 void Update(void); 67 private: 68 flair::sensor::VrpnObject *self; 69 const flair::sensor::VrpnClient *parent; 70 vrpn_Tracker_Remote *tracker; 71 flair::core::Quaternion quaternion; // todo: quaternion should be included in 72 // the output to replace euler angles 73 void Update(void); 76 74 }; 77 75
Note:
See TracChangeset
for help on using the changeset viewer.