From c1ea14d1c96de18448c0c3779d30b7e1e4451f61 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 5 Feb 2021 00:30:13 +0000 Subject: Initial commit generating some basic rail network --- application/main.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'application/main.cpp') diff --git a/application/main.cpp b/application/main.cpp index 94a3b0f..2b62953 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -1,6 +1,9 @@ #include +#include #include #include +#include +#include #include #include #include @@ -11,13 +14,15 @@ #include #include #include +#include #include #include +#include #include #include -static const int DISPLAY_WIDTH = 800; -static const int DISPLAY_HEIGHT = 600; +static const int DISPLAY_WIDTH = 1280; +static const int DISPLAY_HEIGHT = 1024; class SDL_Application : public InputHandler, public std::enable_shared_from_this { public: @@ -62,6 +67,11 @@ public: Worker w; world.create(); + auto rl = world.create(); + auto a = rl->addLink({-1190, 5, -1190}, {-1190, 6, -1180}); + auto b = rl->addLink(a->ends.back().first->pos, glm::vec3 {-1180, 5, -1180}); + auto c = rl->addLink(b->ends.back().first->pos, glm::vec3 {-1180, 4, -1190}); + rl->addLink(c->ends.back().first->pos, a->ends.front().first->pos); Shader shader; Camera camera({-1250.0F, 35.0F, -1250.0F}, 70.0F, (float)DISPLAY_WIDTH / (float)DISPLAY_HEIGHT, 0.1F, 10000.0F); -- cgit v1.2.3