00001 /* 00002 * TUIO.h 00003 * 00004 * 00005 * Created on 2/2/09. 00006 * Copyright 2009 NUI Group. All rights reserved. 00007 * 00008 */ 00009 00010 #ifndef TUIO_H 00011 #define TUIO_H 00012 00013 //#include "../Tracking/ContourFinder.h" 00014 00015 //#include "ofxOsc.h" 00016 //#include "ofxNetwork.h" 00017 00018 //#pragma comment(lib, "winmm.lib") 00019 //#pragma comment(lib, "Ws2_32.lib") 00020 //#pragma comment(lib, ".\\oscpack.lib") 00021 00022 00023 00024 #include "ofxOscSender.h" 00025 00026 class TUIO { 00027 00028 public: 00029 00030 TUIO(); 00031 ~TUIO(); 00032 00033 //methods 00034 void setup(const char* host, int port, int flashport); 00035 // void sendTUIO(std::map<int, Blob> * blobs); 00036 void sendTUIO(int nBlobsSize=0, int* pnid=0, float* pfcx=0, float* pfcy=0, float* pfdx=0, float* pfdy=0, float* pfmac=0); 00037 00038 //TCP Network 00039 // ofxTCPServer m_tcpServer; 00040 //OSC Network 00041 ofxOscSender TUIOSocket; 00042 const char* localHost; 00043 int TUIOPort; 00044 int TUIOFlashPort; 00045 bool bHeightWidth; 00046 bool bOSCMode; 00047 bool bTCPMode; 00048 bool bIsConnected; 00049 00050 bool m_bIsStart; 00051 00052 private: 00053 int frameseq; 00054 // bool send(string message); 00055 // string partialPrevMsg; 00056 int pre_id[64]; 00057 int pre_id_check[64]; 00058 }; 00059 00060 #endif