public void Disconnect() { if (rtStreamThread != null) { rtStreamThread.Dispose(); rtStreamThread = null; } }
/// <summary> /// Connect to QTM and start streaming /// This method is non blocking /// </summary> /// <param name="pickedServer">Picked server.</param> /// <param name="udpPort">UDP port streaming should occur on.</param> /// <param name="stream6d">if 6DOF data should be streamed.</param> /// <param name="stream3d">if labeled markers should be streamed.</param> /// <param name="stream3dNoLabels">if unlabeled markers should be streamed.</param> /// <param name="streamGaze">if gaze vectors should be streamed.</param> /// <param name="streamAnalog">if analog data should be streamed.</param> public void StartConnecting(string IpAddress, short udpPort, bool stream6d, bool stream3d, bool stream3dNoLabels, bool streamGaze, bool streamAnalog, bool streamSkeleton) { errorString = string.Empty; if (rtStreamThread != null) { rtStreamThread.Dispose(); rtStreamThread = null; } rtStreamThread = new RTStreamThread(IpAddress, udpPort, StreamRate.RateAllFrames, stream6d, stream3d, stream3dNoLabels, streamGaze, streamAnalog, streamSkeleton); }