/** * This static method globally resets the TUIO session time. */ public static void initSession() { TuioTime startTime = getSystemTime(); start_seconds = startTime.getSeconds(); start_micro_seconds = startTime.getMicroseconds(); }
/** * Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes. * * @param ttime the TuioTime to compare * @return true if the two TuioTime have equal Seconds and Microseconds attributes */ public bool Equals(TuioTime ttime) { if ((seconds == ttime.getSeconds()) && (micro_seconds == ttime.getMicroseconds())) { return(true); } else { return(false); } }
/** * Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes. * * @param ttime the TuioTime to compare * @return true if the two TuioTime have equal Seconds and Microseconds attributes */ public bool Equals(TuioTime ttime) { if ((seconds==ttime.getSeconds()) && (micro_seconds==ttime.getMicroseconds())) return true; else return false; }
/** * This constructor takes the provided TuioTime * and assigs its Seconds and Microseconds values to the newly created TuioTime. * * @param ttime the TuioTime used to copy */ public TuioTime(TuioTime ttime) { this.seconds = ttime.getSeconds(); this.micro_seconds = ttime.getMicroseconds(); }
private void CallDelegates(TuioTime ftime) { if (SingleTouchChanged != null) { foreach (var point in ActiveTouchPoints.Values) { SingleTouchChanged(this, new SingleTouchEventArgs(point)); } } if (MultiTouchChanged != null) { List<TouchPoint2> list = ActiveTouchPoints.Values.ToList<TouchPoint2>(); MultiTouchChanged(this, new MultiTouchEventArgs(list)); } if (FrameChanged != null) { List<TouchPoint2> points = ActiveTouchPoints.Values.ToList<TouchPoint2>(); List<TouchInfo> infos = new List<TouchInfo>(); foreach (var point in points) { TouchInfo info = new TouchInfo(); info.ActionType = point.Action.ToTouchActions(); info.Position = point.Position; info.TouchDeviceId = point.TouchDeviceId; infos.Add(info); } FrameInfo finfo = new FrameInfo(); finfo.Touches = infos; finfo.TimeStamp = ftime.getMicroseconds(); finfo.WaitTime = (int)ftime.getMicroseconds() - (int)lastTimeStamp; FrameChanged(this, finfo); } lastTimeStamp = (int)ftime.getMicroseconds(); }