-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.hpp
57 lines (44 loc) · 1.06 KB
/
scene.hpp
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
#ifndef RCOASTER_SCENE_HPP
#define RCOASTER_SCENE_HPP
#include <glm/mat4x4.hpp>
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
#include "meshes.hpp"
#include "status.hpp"
#include "types.hpp"
struct Entity {
Mesh* mesh;
glm::mat4 world_transform;
};
struct Scene {
Entity camspl;
Entity ground;
Entity sky;
Entity crossties;
Entity left_rail;
Entity right_rail;
};
struct SceneConfig {
const char* track_filepath;
float max_spline_segment_len;
int is_verbose;
float aabb_side_len;
glm::vec3 ground_position;
uint ground_tex_repeat_count;
glm::vec3 sky_position;
uint sky_tex_repeat_count;
glm::vec3 rails_position;
glm::vec4 rails_color;
float rails_head_w;
float rails_head_h;
float rails_web_w;
float rails_web_h;
float rails_gauge;
float rails_pos_offset_in_camspl_norm_dir;
glm::vec3 crossties_position;
float crossties_separation_dist;
float crossties_pos_offset_in_camspl_norm_dir;
};
Status MakeScene(const SceneConfig* cfg, Scene* scene);
void FreeModelVertices(Scene* scene);
#endif // RCOASTER_SCENE_HPP