示例#1
0
        private void GenerateDataSetStandard()
        {
            if (_datasets != null)
            {
                foreach (var ds in _datasets)
                {
                    if (ds is IDisposable)
                    {
                        ((IDisposable)ds).Dispose();
                    }
                }
            }

            InitStarLists();

            selectedmaps = GetSelectedMaps();

            builder = new DatasetBuilder()
            {
                // TODO: I'm working on deprecating "Origin" so that everything is build with an origin of (0,0,0) and the camera moves instead.
                // This will allow us a little more flexibility with moving the cursor around and improving translation/rotations.
                CenterSystem   = CenterSystem,
                SelectedSystem = _clickedSystem,

                VisitedSystems = VisitedSystems.Where(s => s.time >= startTime && s.time <= endTime).OrderBy(s => s.time).ToList(),

                Images = selectedmaps.ToArray(),

                GridLines  = toolStripButtonGrid.Checked,
                DrawLines  = toolStripButtonDrawLines.Checked,
                AllSystems = toolStripButtonShowAllStars.Checked,
                Stations   = toolStripButtonStations.Checked,
                UseImage   = selectedmaps.Count != 0
            };
            if (_starList != null)
            {
                builder.StarList = _starList.ConvertAll(system => (ISystem)system);
            }
            if (ReferenceSystems != null)
            {
                builder.ReferenceSystems = ReferenceSystems.ConvertAll(system => (ISystem)system);
            }
            if (PlannedRoute != null)
            {
                builder.PlannedRoute = PlannedRoute.ConvertAll(system => (ISystem)system);
            }

            _datasets = builder.Build();
        }
示例#2
0
        public void AddRoutePlannerInfoToDataset()
        {
            if (PlannedRoute != null && PlannedRoute.Any())
            {
                var routeLines = Data3DSetClass <LineData> .Create("PlannedRoute", Color.DarkOrange, 25.0f);

                ISystem prevSystem = PlannedRoute.First();
                foreach (ISystem point in PlannedRoute.Skip(1))
                {
                    routeLines.Add(new LineData(prevSystem.x, prevSystem.y, prevSystem.z, point.x, point.y, point.z));
                    prevSystem = point;
                }
                _datasets.Add(routeLines);
            }
        }