public static ViewMoverSlew Create(CameraParameters from, CameraParameters to)
        {
            ViewMoverSlew temp = new ViewMoverSlew();

            temp.Init(from, to);
            return(temp);
        }
        public static ViewMoverSlew CreateUpDown(CameraParameters from, CameraParameters to, double upDowFactor)
        {
            ViewMoverSlew temp = new ViewMoverSlew();

            temp.upTimeFactor = temp.downTimeFactor = upDowFactor;
            temp.Init(from.Copy(), to.Copy());
            return(temp);
        }
Exemplo n.º 3
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));
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
 public static ViewMoverSlew CreateUpDown(CameraParameters from, CameraParameters to, double upDowFactor)
 {
     ViewMoverSlew temp = new ViewMoverSlew();
     temp.upTimeFactor = temp.downTimeFactor = upDowFactor;
     temp.Init(from.Copy(), to.Copy());
     return temp;
 }
Exemplo n.º 7
0
 public static ViewMoverSlew Create(CameraParameters from, CameraParameters to)
 {
     ViewMoverSlew temp = new ViewMoverSlew();
     temp.Init(from, to);
     return temp;
 }