Exemple #1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Simulation sim        = new Simulation();
            FormWindow mainWindow = new FormWindow(sim)
            {
                Size = new Size(400, 300)
            };

            sim.formWindow = mainWindow;
            //Universe test = UniverseGenerator.GenPseudoRandomUniverse(seed: 1);
            Universe rss = UniverseGenerator.PseudoRealSolarSystem(true);

            sim.initialize(rss);
            //sim.initialize(relative: true);
            //Universe small = UniverseGenerator.GenerateTwoBody(true);
            //sim.initialize(small);
            Application.Run(mainWindow);
        }
 public void initialize(Universe uni = null, bool relative = false)
 {
     universe = uni ?? UniverseGenerator.GenerateTestUniverse(relative);
     physics  = new Physics();
     renderEngine.BaseScaleForUniverse(formWindow, universe);
 }