-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
76 lines (50 loc) · 1.59 KB
/
main.cpp
File metadata and controls
76 lines (50 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include "include/Application.hpp"
#include "include/CelestialObjectJSONReader.hpp"
#include "include/SimulationFiles.hpp"
using namespace std;
void dbg_PlanetJSON()
{
CelestialObjectJSONReader<float> reader("../simulations/and_another_json.json");
std::cout << "\n--- PARSED PLANETS ---\n";
std::vector<CelestialObjectProperties<float>> my_planets = reader.get_planets();
// Test to see if there is more than one object
for (const auto &planet : my_planets) {
// Assumindo que CelestialObjectProperties tem getters
std::cout << "Name: " << planet.get_name() << "\n";
std::cout << "Mass: " << planet.get_mass() << "\n";
std::cout << "----------------\n";
}
for (const auto &a : reader.get_axis()) {
std::cout << "Axis: " << a << "\n";
}
for (const auto &a : reader.get_eccentricity()) {
std::cout << "eccentric: " << a << "\n";
}
}
void dbg_simulationPath()
{
SimulationFiles SF;
auto a = SF.availableSimulations();
SF.loadSimulation(a[0]);
for (auto &it : a){
cout << it << "\n";
}
cout << SF;
auto plnt = SF.loadSimulation("solar_system.json");
SimulationWrapper sim;
sim.setInitialState(plnt, true);
cout << "dt: " << sim.getDeltaTime() << endl;
cout << "names:";
for(auto i : sim.getPlanetNames()) cout << i << endl;
cout << "planets\n";
// for(auto it : sim.getPlanets()){
// cout << it << endl;
// }
}
int main() {
// GLFW init
Application app;
app.run();
// dbg_PlanetJSON();
return 0;
}