00001
00010
00011 #ifdef USE_ISENSE
00012
00013 #ifndef ISENSEDIRECT_H
00014 #define ISENSEDIRECT_H
00015
00016 #include <G3D/G3DAll.h>
00017 #include "InputDevice.H"
00018
00019 #include <isense.h>
00020
00021 namespace VRG3D {
00024 class ISenseDirect : public InputDevice
00025 {
00026 public:
00027 ISenseDirect(
00028 const Array<std::string> &trackerEventNames,
00029 const double &trackerUnitsToRoomUnitsScale,
00030 const CoordinateFrame &deviceToRoom,
00031 const Array<CoordinateFrame> &propToTracker,
00032 const Array<CoordinateFrame> &finalOffset,
00033 const Array< Array<std::string> > &buttonEventNames
00034 );
00035
00036 virtual ~ISenseDirect();
00037
00038 void pollForInput(Array<EventRef> &events);
00039
00040 std::string getTrackerName(int trackerNumber);
00041 std::string getButtonName(int stationNumber, int buttonNumber);
00042
00043 private:
00044 Array<std::string> _tEventNames;
00045 Array< Array<std::string> > _bEventNames;
00046 double _trackerUnitsToRoomUnitsScale;
00047 CoordinateFrame _deviceToRoom;
00048 Array<CoordinateFrame> _propToTracker;
00049 Array<CoordinateFrame> _finalOffset;
00050
00051 Bool _btnStatus[ISD_MAX_STATIONS][ISD_MAX_BUTTONS];
00052 ISD_TRACKER_HANDLE _handle;
00053 ISD_STATION_INFO_TYPE _stationInfo[ISD_MAX_STATIONS];
00054 int _maxStations;
00055 };
00056
00057 }
00058
00059 #endif
00060
00061
00062 #endif // USE_ISENSE
00063
00064
00065
00066