예제 #1
0
        public double ElapsedTimeSinceLastMaster(int index, out TourStop masterOut)
        {
            masterOut = null;
            if (index == 0 && index >= tourStops.Count)
            {
                return(0);
            }
            double totalTime = 0.0;

            for (int i = 0; i < index; i++)
            {
                if (tourStops[i].MasterSlide)
                {
                    totalTime = 0;
                    masterOut = tourStops[i];
                }

                totalTime += (double)(tourStops[i].Duration.TotalMilliseconds / 1000);
                if (i > 0 && !tourStops[i].MasterSlide)
                {
                    switch (tourStops[i].Transition)
                    {
                    case TransitionType.Slew:
                        CameraParameters start = tourStops[i - 1].EndTarget == null ? tourStops[i - 1].Target.CamParams : tourStops[i - 1].EndTarget.CamParams;
                        if (tourStops[i - 1].Target.BackgroundImageSet.DataSetType == tourStops[i].Target.BackgroundImageSet.DataSetType &&
                            ((tourStops[i - 1].Target.BackgroundImageSet.DataSetType != ImageSetType.SolarSystem) || (tourStops[i - 1].Target.Target == tourStops[i].Target.Target)))
                        {
                            ViewMoverSlew slew = new ViewMoverSlew(start, tourStops[i].Target.CamParams);
                            totalTime += slew.MoveTime;
                        }
                        break;

                    case TransitionType.CrossCut:
                        break;

                    case TransitionType.CrossFade:
                        break;

                    case TransitionType.FadeOut:
                        break;

                    default:
                        break;
                    }
                }
            }
            return(totalTime);
        }
예제 #2
0
        private TimeSpan CalculateRunTime()
        {
            double totalTime = 0.0;

            for (int i = 0; i < tourStops.Count; i++)
            {
                totalTime += (double)(tourStops[i].Duration.TotalMilliseconds / 1000);
                if (i > 0)
                {
                    switch (tourStops[i].Transition)
                    {
                    case TransitionType.Slew:
                        if (tourStops[i].Target.BackgroundImageSet == null || (tourStops[i - 1].Target.BackgroundImageSet.DataSetType == tourStops[i].Target.BackgroundImageSet.DataSetType &&
                                                                               ((tourStops[i - 1].Target.BackgroundImageSet.DataSetType != ImageSetType.SolarSystem) || (tourStops[i - 1].Target.Target == tourStops[i].Target.Target))))
                        {
                            CameraParameters start = tourStops[i - 1].EndTarget == null ? tourStops[i - 1].Target.CamParams : tourStops[i - 1].EndTarget.CamParams;
                            ViewMoverSlew    slew  = new ViewMoverSlew(start, tourStops[i].Target.CamParams);
                            totalTime += slew.MoveTime;
                        }
                        break;

                    case TransitionType.CrossCut:
                        break;

                    case TransitionType.CrossFade:
                        break;

                    case TransitionType.FadeOut:
                        break;

                    default:
                        break;
                    }
                }
            }
            return(TimeSpan.FromSeconds(totalTime));
        }
예제 #3
0
 public double ElapsedTimeTillTourstop(int index)
 {
     if (index == 0 && index >= tourStops.Count)
     {
         return 0;
     }
     var totalTime = 0.0;
     for (var i = 0; i < index; i++)
     {
         totalTime += tourStops[i].Duration.TotalMilliseconds / 1000;
         if (i > 0)
         {
             switch (tourStops[i].Transition)
             {
                 case TransitionType.Slew:
                     var start = tourStops[i - 1].EndTarget == null ? tourStops[i - 1].Target.CamParams : tourStops[i - 1].EndTarget.CamParams;
                     if (tourStops[i - 1].Target.BackgroundImageSet.DataSetType == tourStops[i].Target.BackgroundImageSet.DataSetType
                         && ((tourStops[i - 1].Target.BackgroundImageSet.DataSetType != ImageSetType.SolarSystem) || (tourStops[i - 1].Target.Target == tourStops[i].Target.Target)))
                     {
                         var slew = new ViewMoverSlew(start, tourStops[i].Target.CamParams);
                         totalTime += slew.MoveTime;
                     }
                     break;
                 case TransitionType.CrossCut:
                     break;
                 case TransitionType.CrossFade:
                     break;
                 case TransitionType.FadeOut:
                     break;
                 default:
                     break;
             }
         }
     }
     return totalTime;
 }
예제 #4
0
 private TimeSpan CalculateRunTime()
 {
     var totalTime = 0.0;
     for (var i = 0; i < tourStops.Count; i++)
     {
         totalTime += tourStops[i].Duration.TotalMilliseconds / 1000;
         if (i > 0)
         {
             switch (tourStops[i].Transition)
             {
                 case TransitionType.Slew:
                     if (tourStops[i].Target.BackgroundImageSet == null || (tourStops[i - 1].Target.BackgroundImageSet.DataSetType == tourStops[i].Target.BackgroundImageSet.DataSetType
                         && ((tourStops[i - 1].Target.BackgroundImageSet.DataSetType != ImageSetType.SolarSystem) || (tourStops[i - 1].Target.Target == tourStops[i].Target.Target))))
                     {
                         var start = tourStops[i - 1].EndTarget == null ? tourStops[i - 1].Target.CamParams : tourStops[i - 1].EndTarget.CamParams;
                         var slew = new ViewMoverSlew(start, tourStops[i].Target.CamParams);
                         totalTime += slew.MoveTime;
                     }
                     break;
                 case TransitionType.CrossCut:
                     break;
                 case TransitionType.CrossFade:
                     break;
                 case TransitionType.FadeOut:
                     break;
                 default:
                     break;
             }
         }
     }
     return TimeSpan.FromSeconds(totalTime);
 }
예제 #5
0
        public double ElapsedTimeSinceLastMaster(int index, out TourStop masterOut)
        {
            masterOut = null;
            if (index == 0 && index >= tourStops.Count)
            {
                return 0;
            }
            double totalTime = 0.0;
            for (int i = 0; i < index; i++)
            {
                if (tourStops[i].MasterSlide)
                {
                    totalTime = 0;
                    masterOut = tourStops[i];
                }

                totalTime += (double)(tourStops[i].Duration.TotalMilliseconds / 1000);
                if (i > 0 && !tourStops[i].MasterSlide)
                {
                    switch (tourStops[i].Transition)
                    {
                        case TransitionType.Slew:
                            CameraParameters start = tourStops[i - 1].EndTarget == null ? tourStops[i - 1].Target.CamParams : tourStops[i - 1].EndTarget.CamParams;
                            if (tourStops[i - 1].Target.BackgroundImageSet.DataSetType == tourStops[i].Target.BackgroundImageSet.DataSetType
                                && ((tourStops[i - 1].Target.BackgroundImageSet.DataSetType != ImageSetType.SolarSystem) || (tourStops[i - 1].Target.Target == tourStops[i].Target.Target)))
                            {
                                ViewMoverSlew slew = new ViewMoverSlew(start, tourStops[i].Target.CamParams);
                                totalTime += slew.MoveTime;
                            }
                            break;
                        case TransitionType.CrossCut:
                            break;
                        case TransitionType.CrossFade:
                            break;
                        case TransitionType.FadeOut:
                            break;
                        default:
                            break;
                    }
                }
            }
            return totalTime;
        }