00001
00003
00004
00005
00006
00007
00009
00011
00012
00013
00015
00016 #ifndef _VRJGA_TRACKER_DEVICE_H_
00017 #define _VRJGA_TRACKER_DEVICE_H_
00018
00019 #include "vrjGA/Referenced.h"
00020
00021 #include "gadget/Type/PositionInterface.h"
00022
00023 #include "gmtl/Matrix.h"
00024
00025 #include <string>
00026
00027
00028 namespace vrjGA {
00029
00030
00031 class VRJ_GA_EXPORT TrackerDevice : public Referenced
00032 {
00033 public:
00034
00035
00036 typedef Referenced BaseClass;
00037 typedef gadget::PositionInterface PI;
00038
00039
00040 VRJGA_DECLARE_POINTER ( TrackerDevice );
00041
00042
00043 TrackerDevice ( const std::string &name );
00044
00045
00046 const gmtl::Matrix44f& matrix() const { return _matrix; }
00047
00048
00049 double time() { return _time; }
00050
00051
00052 void update();
00053
00054
00055 float x() const { return _matrix ( 0, 3 ); }
00056 float y() const { return _matrix ( 1, 3 ); }
00057 float z() const { return _matrix ( 2, 3 ); }
00058
00059 protected:
00060 virtual ~TrackerDevice();
00061
00062 private:
00063
00064
00065 TrackerDevice ( const TrackerDevice & );
00066 TrackerDevice& operator = ( const TrackerDevice & );
00067
00068 PI _pi;
00069 gmtl::Matrix44f _matrix;
00070 double _time;
00071 };
00072
00073
00074 };
00075
00076
00077 #endif // _VRJGA_TRACKER_DEVICE_H_