示例#1
0
        public MasterTime ElapsedTimeSinceLastMaster(int index)
        {
            TourStop masterOut = null;

            if (index == 0 && index >= tourStops.Count)
            {
                return(null);
            }
            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);
                if (i > 0)
                {
                    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 = ViewMoverSlew.Create(start, tourStops[i].Target.CamParams);
                            totalTime += slew.MoveTime * 1000;
                        }
                        break;

                    case TransitionType.Instant:
                        break;

                    case TransitionType.CrossFade:
                        break;

                    case TransitionType.FadeToBlack:
                        break;

                    default:
                        break;
                    }
                }
            }


            return(new MasterTime(masterOut, totalTime / 1000));
        }
示例#2
0
        public double ElapsedTimeTillTourstop(int index)
        {
            if (index == 0 && index >= tourStops.Count)
            {
                return(0);
            }
            double totalTime = 0.0;

            for (int i = 0; i < index; i++)
            {
                totalTime += (double)(tourStops[i].Duration);
                if (i > 0)
                {
                    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 = ViewMoverSlew.Create(start, tourStops[i].Target.CamParams);
                            totalTime += slew.MoveTime * 1000;
                        }
                        break;

                    case TransitionType.CrossCut:
                        break;

                    case TransitionType.CrossFade:
                        break;

                    case TransitionType.FadeOut:
                        break;

                    default:
                        break;
                    }
                }
            }
            return(totalTime / 1000);
        }
示例#3
0
        private int CalculateRunTime()
        {
            double totalTime = 0.0;

            for (int i = 0; i < tourStops.Count; i++)
            {
                totalTime += (double)(tourStops[i].Duration);
                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  = ViewMoverSlew.Create(start, tourStops[i].Target.CamParams);
                            totalTime += slew.MoveTime * 1000;
                        }
                        break;

                    case TransitionType.Instant:
                        break;

                    case TransitionType.CrossFade:
                        break;

                    case TransitionType.FadeToBlack:
                        break;

                    default:
                        break;
                    }
                }
            }
            return((int)totalTime);
        }