-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
85 lines (81 loc) · 2.56 KB
/
main.h
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
76
77
78
79
80
81
82
83
84
85
#pragma once
#include <GL/glut.h>
#include <emscripten.h>
#include <stdio.h>
#include "IncGLM.hpp"
#include "OpenGL/Skybox.hpp"
#include "Source/plane.h"
#include "FOSS_Code/json.hpp"
#include "Source/Grid.h"
#include <cstring>
using json = nlohmann::json;
constexpr int KEY_VALUE_OUTSIDE_GLUT_RANGE = 1000;
char const * const RenderingParameterJSON = R"(
{
"sky color RGB" : [135,206,235],
"fog density" : 0.00025,
"terrain parameters":{
"divisions" : 10,
"wave numbers active" : [0,1,2,3,4,5,6,7,8,9,10],
"rotation angle fractal ground" : 36.87,
"output_increase_fctr_" : 3.0,
"input_shrink_fctr_": 3.0,
"length of one side":20.0,
"lacunarity" : 2.0,
"persistance" : 3.1,
"Mountain Scale Factor" : 50
},
"plane parameters":{
"plane":"1",
"Camera Beind Distance" : 20.0,
"Camera Up Distance" : 3.50,
"Camera ViewPoint Distance" : 1.0,
"Plane Speed" : 5
},
"cloud parameters":{
"distance above terrain" : 350,
"cloud per division" : 50,
"scale" : 0.4,
"input shrink factor" : 500.0,
"time shrink factor" : 600.0,
"velocity" : 0.15,
"rotational velocity degree" : 0.10
},
"tress parameters":{
"tress per division" : 4,
"tress scale" : 100.0
},
"sun parameters":{
"direction vector":[ -0.624695 , 0.468521 , -0.624695 ]
},
"camera":{
"FOV": 45.0,
"Near Plane" : 0.1,
"Far Plane" : 10000.0
},
"planes":{
"1":{
"Plane OBJ file" : "assets/Planes/Aeroplane/Plane.obj",
"Plane Texuture file" : "assets/Planes/Aeroplane/Color plane map.png",
"Plane Scale" : 1.0,
"rotation angles":[ 0.0 , 0.0 , 0.0 ],
"rotation axises":[ "y" , "z" , "x" ]
},
"2":{
"Plane OBJ file" : "assets/Planes/Airplane/PUSHILIN_Plane.obj",
"Plane Texuture file" : "assets/Planes/Airplane/PUSHILIN_PLANE.png",
"Plane Scale" : 1.0,
"rotation angles":[ -90.0 , -10.0 , 0.0 ],
"rotation axises":[ "y" , "z" , "x" ]
},
"3":{
"Plane OBJ file" : "assets/Planes/Airplane (1)/Airplane.obj",
"Plane Texuture file" : "assets/Planes/Airplane (1)/Airplane Texture.png",
"Plane Scale" : 0.0025,
"rotation angles":[ 0.0 , 0.0 ,0.0 ],
"rotation axises":[ "x" , "y" , "z" ]
}
}
}
)";
json parameter_json = json::parse(RenderingParameterJSON);