diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-05 18:53:45 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-05 18:53:45 +0000 |
commit | e40b6bfe346bb93a2d3b38745b8fddba40e759c6 (patch) | |
tree | 1ad5746d5b49f12fe47e918e5c7d9c392c4e3e8d /application | |
parent | Initial commit generating some basic rail network (diff) | |
download | ilt-e40b6bfe346bb93a2d3b38745b8fddba40e759c6.tar.bz2 ilt-e40b6bfe346bb93a2d3b38745b8fddba40e759c6.tar.xz ilt-e40b6bfe346bb93a2d3b38745b8fddba40e759c6.zip |
Initial commit adding curved rail pieces
Diffstat (limited to 'application')
-rw-r--r-- | application/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/application/main.cpp b/application/main.cpp index 2b62953..a723b20 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -14,7 +14,6 @@ #include <gfx/manualCameraController.h> #include <gfx/renderable.h> #include <gfx/window.h> -#include <glm/glm.hpp> #include <memory> #include <special_members.hpp> #include <utility> @@ -69,9 +68,9 @@ public: world.create<Terrain>(); auto rl = world.create<RailLinks>(); auto a = rl->addLink<RailLinkStraight>({-1190, 5, -1190}, {-1190, 6, -1180}); - auto b = rl->addLink<RailLinkStraight>(a->ends.back().first->pos, glm::vec3 {-1180, 5, -1180}); - auto c = rl->addLink<RailLinkStraight>(b->ends.back().first->pos, glm::vec3 {-1180, 4, -1190}); - rl->addLink<RailLinkStraight>(c->ends.back().first->pos, a->ends.front().first->pos); + auto b = rl->addLink<RailLinkCurve>(a->ends.back().first->pos, {-1180, 5, -1180}, {-1185, -1180}); + auto c = rl->addLink<RailLinkStraight>(b->ends.back().first->pos, {-1180, 4, -1190}); + rl->addLink<RailLinkCurve>(c->ends.back().first->pos, a->ends.front().first->pos, {-1185, -1190}); Shader shader; Camera camera({-1250.0F, 35.0F, -1250.0F}, 70.0F, (float)DISPLAY_WIDTH / (float)DISPLAY_HEIGHT, 0.1F, 10000.0F); |