00001 00010 #ifndef MOUSETOTRACKER_H 00011 #define MOUSETOTRACKER_H 00012 00013 #include "IS3DCommon.H" 00014 #include "Fsa.H" 00015 #include "FsaMgr.H" 00016 #include "TrackerDevice.H" 00017 00018 namespace IS3D { 00019 00020 class MouseToTracker : public TrackerDevice 00021 { 00022 public: 00023 MouseToTracker(const std::string &nameForEvents, 00024 CoordinateFrame initialFrame=CoordinateFrame()); 00025 00026 static MouseToTracker* fromConfigVals(const std::string &devname); 00027 00028 virtual ~MouseToTracker(); 00029 00030 void mouseMoveInPlane(EventRef e); 00031 void mouseMoveInOut(EventRef e); 00032 void mouseMoveRotX(EventRef e); 00033 void mouseMoveRotY(EventRef e); 00034 void mouseMoveRotZ(EventRef e); 00035 00036 // implementations of methods inherited from TrackerDevice 00037 int getNumTrackers() { return 1; } 00038 std::string getEventName(int trackerNumber) { return _eName; } 00039 void setDeviceCalibrationSample(CoordinateFrame sample) {} 00040 void setTrackerOffsetCalibrationSample(int trackerNum,CoordinateFrame sample) {} 00041 CoordinateFrame getDeviceCalibrationSample() { return CoordinateFrame(); } 00042 CoordinateFrame getTrackerOffsetCalibrationSample(int trackerNum) { 00043 return CoordinateFrame(); 00044 } 00045 void setReportDeviceRegisteredData(bool b) {} 00046 void setReportTrackerRegisteredData(bool b) {} 00047 bool getReportDeviceRegisteredData() { return true; } 00048 bool getReportTrackerRegisteredData() { return true; } 00049 00050 00051 00052 protected: 00053 FsaRef _fsa; 00054 Matrix3 _rot; 00055 Vector3 _trans; 00056 std::string _eName; 00057 Vector2 _lastPos; 00058 }; 00059 00060 } // end namespace 00061 00062 #endif