Beispiel #1
0
        private void UpdateSkeletonFrames(List <SkeletonRenderFrame> capturedFrames, DateTime timeStamp)
        {
            DateTime oldest = skeletonFrames.OldestFrameTime;

            if (oldest != DateTime.MinValue && DateTimeUtilities.DifferenceInMilliseconds(oldest, timeStamp) > renderDuration.TotalSeconds * 1000)
            {
                skeletonFrames.Remove(oldest);
                UpdateSkeletonFrames(capturedFrames, timeStamp);
            }
            else
            {
                skeletonFrames.Add(timeStamp, capturedFrames);
            }
        }
Beispiel #2
0
        public SkeletonRenderFrames GetFramesWithinInterval(DateTime startTime, DateTime endTime)
        {
            SkeletonRenderFrames frames = new SkeletonRenderFrames();

            foreach (DateTime timeStamp in skeletonFrames.FramesTimeStamps)
            {
                if (timeStamp.CompareTo(startTime) >= 0 && timeStamp.CompareTo(endTime) <= 0)
                {
                    frames.Add(timeStamp, skeletonFrames[timeStamp]);
                }
            }

            return(frames);
        }