2 #include "app/Application.hpp"
3 #include "app/Assets.hpp"
4 #include "app/init.hpp"
5 #include "app/MasterState.hpp"
6 #include "world/Planet.hpp"
7 #include "world/Simulation.hpp"
8 #include "world/Sun.hpp"
14 using namespace blobs;
16 int main(int argc, char *argv[]) {
23 sun.SurfaceTilt(glm::dvec2(PI * 0.25, PI * 0.25));
24 sun.AngularMomentum(1.0e9);
26 world::Planet planet(11);
27 world::GenerateTest(planet);
28 planet.SetParent(sun);
30 planet.GetOrbit().SemiMajorAxis(100.0);
31 planet.SurfaceTilt(glm::dvec2(PI * 0.25, PI * 0.25));
32 planet.AxialTilt(glm::dvec2(PI * 0.127, 0.0));
33 planet.AngularMomentum(3.0e9);
35 world::Planet moon(3);
36 world::GenerateTest(moon);
37 moon.SetParent(planet);
39 moon.GetOrbit().SemiMajorAxis(25.0);
40 moon.AngularMomentum(1.0e5);
42 world::Simulation sim(sun);
46 std::cout << "length of year: " << planet.OrbitalPeriod() << "s" << std::endl;
47 std::cout << "length of moon cycle: " << moon.OrbitalPeriod() << "s" << std::endl;
48 std::cout << "length of day: " << planet.RotationalPeriod() << "s" << std::endl;
50 app::MasterState state(assets, sim);
51 state.SetReference(planet);
54 app::Application app(init.window, init.viewport);
55 app.PushState(&state);