vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fdtDataGlove.h
Go to the documentation of this file.
1 /***************************************************************************
2  fdtdataglove.h - description
3  -------------------
4  begin : Mon Jun 3 2002
5  copyright : (C) 2002 by Jan Flasar, Ludek Pokluda
6  email : flasar|xpokluda|markovic@fi.muni.cz
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef FDTDATAGLOVE_H
19 #define FDTDATAGLOVE_H
20 
21 #include <vrecko/Device.h>
22 
23 #include <map>
24 
25 
26 namespace vreckoDP_base {
27 
28 class DP_EXPORT fdtDataGlove: public vrecko::Device {
29  public:
30  fdtDataGlove();
31  fdtDataGlove(char *port);
32  ~fdtDataGlove();
33 
34  virtual int openDevice(void);
35  int closeDevice(void);
36  int calibrateDevice(void);
37 
38  void update(void) {scanDevice();}
39  int *getSignal(void);
40 
41  int getActualValue(float *p_actual_value);
42  void freezeRotation(bool new_freezeR);
43  void freezeFingerSensor(int id_FS, bool new_freezeFS);
44  int getFingerDirection(int id_finger, float *p_finger_direction);
45  int getRotate(float *p_rotate);
46 
47  void setSignalType(int _signal_id, int _type) {_signal_type_table[_signal_id] = _type;}
48 
49  protected:
50  char *hand_type;
52  bool freeze_rotation, freeze_finger_sensor[1+18];
53  float finger_direction[5][6];
55 
56  std::map<int, int> _signal_type_table;
58 
59  int scanDevice(void);
60 };
61 
62 }
63 
64 #endif