Vector2 getRawPoint(WM_Tracking.TOUCHINPUT data) { WM_Tracking.POINT p = tracking.getClientPoint(data); Vector2 position = new Vector2(p.X, p.Y); return(position); }
Tuio.Touch buildTouch(WM_Tracking.TOUCHINPUT cursor) { Vector2 p = getScreenPoint(cursor); Vector2 raw = getRawPoint(cursor); Tuio.Touch t = new Tuio.Touch(cursor.dwID, p, raw); return(t); }
Vector2 getScreenPoint(WM_Tracking.TOUCHINPUT data) { WM_Tracking.POINT p = tracking.getClientPoint(data); Vector2 position = new Vector2(p.X, p.Y); float x1 = getScreenPoint(position.x, ScreenWidth, false); float y1 = getScreenPoint(position.y, ScreenHeight, true); Vector2 t = new Vector2(x1, y1); return(t); }