00001
00002
00003
00004
00005
00014 #ifndef __SIGNOTMODULE_H__
00015 #define __SIGNOTMODULE_H__
00016
00017 #include <OpenTracker/OpenTracker.h>
00018 #include <string>
00019
00020 #include <SignDLL.h>
00021
00022 class SignOTSink;
00023 class SignImageSink;
00024 class SignOTSource;
00025 class SignContext;
00026 class SignSink;
00027 class SignOrientationTransform;
00028 struct SignSignStationEventInfo;
00029
00030 typedef std::map<std::string, SignSink *> SinkMap;
00031 typedef std::map<std::string, SignOTSource *> SourceMap;
00032
00033
00034 class SIGN_EXPORT SignOTModule : public ot::Module, public ot::NodeFactory
00035 {
00036
00037 public:
00038 SignOTModule();
00039
00041 virtual ~SignOTModule();
00042
00044 int getMaxStationNumber();
00045
00051 ot::Node * createNode( const std::string& name, ot::StringTable& attributes);
00052
00056 ot::Context * getContext();
00057
00063 bool isEventEnabled( int which );
00064
00068 const char *getFilename();
00069
00070 void SetSignContext(SignContext *sp);
00071
00072 SignImageSink* findImageSink(std::string name);
00073 SignOTSink* findOTSink(std::string name);
00074 SignOTSource* findSource(std::string name);
00075
00076 void AddSource(SignOTSource *source,std::string name);
00077
00078 void pushEvent();
00080 void pullEvent();
00081 void SetTracker(std::string name,std::vector<float> pos,std::vector<float> quat);
00082 void SetTracker(std::string name, ot::Event *event);
00083 void SetPlane(std::string name, std::string plane);
00084 void SetDelay(double delay);
00085 SinkMap * GetOTSinkMap();
00086
00087 void AddVirtualTransform(double tx,double ty,double tz);
00088 protected:
00090 int isActive;
00092 SinkMap imageSinkMap;
00093 SinkMap otSinkMap;
00094 SinkMap ecgSinkMap;
00096 SourceMap sourceMap;
00098 ot::Context context;
00100 int maximum;
00102 std::string filename;
00103
00104 private:
00105 SignContext *signContext;
00106 double lastTime;
00107 double delayTime;
00108
00109 friend class SignOTSink;
00110 friend class SignOTSource;
00111 };
00112
00113
00114 void registerModuleSignOTModule(ot::Context* context, void *data);
00115
00116 #endif