00001
00016
00017 #ifdef USE_PHANTOM
00018
00019 #ifndef PHANTOMDEVICE_H
00020 #define PHANTOMDEVICE_H
00021
00022 #include "IS3DCommon.H"
00023 #include "PolledDevice.H"
00024
00025 class PhantomInterface;
00026
00027 namespace IS3D {
00028
00029 class PhantomDevice : public PolledDevice
00030 {
00031 public:
00032 PhantomDevice(const std::string &trackerEventName,
00033 const std::string &buttonEventName,
00034 CoordinateFrame deviceToRoom,
00035 CoordinateFrame applicationToTracker,
00036 bool promptForDeviceReset = false);
00037
00038 static PhantomDevice* fromConfigVals(const std::string &devname);
00039
00040
00041 virtual ~PhantomDevice();
00042
00043 void pollForEvents();
00044
00045 std::string getTrackerEventName() { return _trackerEventName; }
00046 std::string getButtonEventName() { return _buttonEventName; }
00047 CoordinateFrame getDeviceToRoom() { return _deviceToRoom; }
00048 CoordinateFrame getApplicationToTracker() { return _applicationToTracker; }
00049 PhantomInterface* getPhantomInterface() { return _phantomInterface; }
00050
00051 private:
00052 std::string _trackerEventName;
00053 std::string _buttonEventName;
00054 CoordinateFrame _deviceToRoom;
00055 CoordinateFrame _applicationToTracker;
00056 PhantomInterface *_phantomInterface;
00057 bool _lastBtnStatus;
00058 };
00059
00060 }
00061
00062 #endif
00063
00064
00065 #endif // USE_PHANTOM
00066