Esempio n. 1
0
 public RenderCanvas(TimeSpan renderDuration)
 {
     this.skeletonFrames     = new SkeletonRenderFrames();
     this.renderDuration     = renderDuration;
     this.canvasMode         = Mode.ListeningAndFiring;
     this.previousCanvasMode = Mode.ListeningAndFiring;
 }
Esempio n. 2
0
 public void Add(SkeletonRenderFrames skeletonRenderFrames)
 {
     foreach (DateTime timeStamp in skeletonRenderFrames.FramesTimeStamps)
     {
         Add(timeStamp, skeletonRenderFrames[timeStamp]);
     }
 }
Esempio n. 3
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);
        }
Esempio n. 4
0
        public void ReplayCanvas(DateTime startTime, DateTime endTime)
        {
            SetCanvasMode(Mode.Firing);
            SkeletonRenderFrames frames = GetFramesWithinInterval(startTime, endTime);

            lock (canvasPlayerLock)
            {
                CanvasPlayer canvasPlayer = new CanvasPlayer(frames);
                canvasPlayer.ImageRendered  += new ImagingUtilities.ImageRenderedEventHandler(canvasPlayer_ImageRendered);
                canvasPlayer.PlayerFinished += new CanvasPlayer.PlayerFinishedEventHandler(canvasPlayer_PlayerFinished);
                Thread thread = new Thread(canvasPlayer.Start);
                thread.Start();
            }
        }
 public CanvasPlayer(SkeletonRenderFrames renderFrames)
 {
     this.renderFrames = renderFrames;
 }
Esempio n. 6
0
 public void Add(SkeletonRenderFrames skeletonRenderFrames)
 {
     foreach (DateTime timeStamp in skeletonRenderFrames.FramesTimeStamps)
     {
         Add(timeStamp, skeletonRenderFrames[timeStamp]);
     }
 }
 public CanvasPlayer(SkeletonRenderFrames renderFrames)
 {
     this.renderFrames = renderFrames;
 }
Esempio n. 8
0
 public void LoadCanvasFrames(string filename)
 {
     SetCanvasMode(Mode.Stopped);
     skeletonFrames = Serializer.DeserializeObject <SkeletonRenderFrames>(filename);
     RevertCanvasMode();
 }