From 838e5f77478e5648769439e191e3ff0a8e6405ab Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 22 Feb 2021 20:12:59 +0000 Subject: Add meandering support Add rail links between existing nodes and arbitrary points --- application/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'application') diff --git a/application/main.cpp b/application/main.cpp index 69b62ba..49b7cda 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -67,6 +67,13 @@ public: { const glm::vec3 j {-1100, 15, -1100}, k {-1100, 15, -1000}, l {-1150, 10, -1050}, m {-1050, 10, -1050}; rl->addLink(j, k); + auto e = rl->addLinksBetween(k, {-1000, 20, -800})->ends[1].first->pos; + e = rl->addLinksBetween(e, {-900, 30, -600})->ends[0].first->pos; + e = rl->addLinksBetween(e, {-600, 32, -500})->ends[1].first->pos; + e = rl->addLinksBetween(e, {-500, 30, -800})->ends[1].first->pos; + e = rl->addLinksBetween(e, {-600, 25, -900})->ends[1].first->pos; + e = rl->addLinksBetween(e, {-1000, 10, -1129})->ends[0].first->pos; + e = rl->addLinksBetween(e, j)->ends[0].first->pos; rl->addLink(l, k, glm::vec2 {l.x, k.z}); auto l3 = rl->addLink(l, m); rl->addLink(m, j, glm::vec2 {m.x, j.z}); -- cgit v1.2.3