/// <summary> /// Starts recording a new sub session /// </summary> /// <param name="_treadmillSpeed">The starting speed</param> private static void RecordedSubSessionStart(float _treadmillSpeed) { _subSessionStartTime = DateTime.Now; _currentSubSession = new VirtualMotionCaptureSubSession(); _currentFrame = new VirtualMotionCaptureFrame(); SaveTreadmillSpeedChange(_treadmillSpeed); }
/// <summary> /// Saves one frame of data /// </summary> private static void SaveFrame() { _currentFrame.MarkerList = new List <Marker>(_currentMarkerList); _currentFrame.TrackableList = new List <Trackable>(_currentTrackableList); _currentFrame.TimeStamp = _currentTrackableTimeStamp; _currentSubSession.AddFrame(_currentFrame); _currentFrame = new VirtualMotionCaptureFrame(); }
/// <summary> /// Gets the next frame from the database /// </summary> /// <returns></returns> private static bool GetNextFrame() { _currentFrame = _currentSubSession.GetNextFrame(); if (_currentFrame == null) { _currentSubSession.ResetSubSession(); return(false); } else { return(true); } }
/// <summary> /// Saves one frame of data /// </summary> private static void SaveFrame() { _currentFrame.MarkerList = new List<Marker>(_currentMarkerList); _currentFrame.TrackableList = new List<Trackable>(_currentTrackableList); _currentFrame.TimeStamp = _currentTrackableTimeStamp; _currentSubSession.AddFrame(_currentFrame); _currentFrame = new VirtualMotionCaptureFrame(); }
/// <summary> /// Gets the next frame from the database /// </summary> /// <returns></returns> private static bool GetNextFrame() { _currentFrame = _currentSubSession.GetNextFrame(); if (_currentFrame == null) { _currentSubSession.ResetSubSession(); return false; } else return true; }
/// <summary> /// Adds a frame of data /// </summary> /// <param name="frame"></param> public void AddFrame(VirtualMotionCaptureFrame frame) { _virtualMotionCaptureFrameList.Add(frame); }