diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-14 13:14:32 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-14 13:14:32 +0000 |
commit | dd80098076cda9c103b44356ca07c2c8bc7698d7 (patch) | |
tree | abea9da9105f33d8449bad00241d8406954d7bfb /game/network/link.h | |
parent | Correctly scaled rails (diff) | |
download | ilt-dd80098076cda9c103b44356ca07c2c8bc7698d7.tar.bz2 ilt-dd80098076cda9c103b44356ca07c2c8bc7698d7.tar.xz ilt-dd80098076cda9c103b44356ca07c2c8bc7698d7.zip |
Join links in rail graph
Diffstat (limited to 'game/network/link.h')
-rw-r--r-- | game/network/link.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/game/network/link.h b/game/network/link.h index 287ba14..c9fbedb 100644 --- a/game/network/link.h +++ b/game/network/link.h @@ -6,6 +6,7 @@ #include <memory> #include <special_members.hpp> #include <utility> +#include <vector> // Generic network node // something that can be travelled to @@ -24,6 +25,8 @@ using NodePtr = std::shared_ptr<Node>; // Generic network link // something that can be travelled along // it joins 2 nodes +class Link; +using LinkPtr = std::shared_ptr<Link>; class Link { public: using End = std::pair<NodePtr, float /*dir*/>; @@ -35,6 +38,8 @@ public: std::array<End, 2> ends; float length; + using Next = std::pair<LinkPtr, unsigned char /*end*/>; + std::array<std::vector<Next>, 2> nexts; }; bool operator<(const glm::vec3 & a, const glm::vec3 & b); |