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 /game/network/rail.h | |
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 'game/network/rail.h')
-rw-r--r-- | game/network/rail.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/game/network/rail.h b/game/network/rail.h index ef119bc..7e1f5ac 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -33,12 +33,21 @@ public: RailLinkStraight(End, End); }; +class RailLinkCurve : public RailLink { +public: + RailLinkCurve(End, End, glm::vec2); + +private: + glm::vec2 centre; +}; + template<typename T> concept RailLinkConcept = std::is_base_of_v<RailLink, T>; class RailLinks : public Renderable, public WorldObject { public: RailLinks(); template<RailLinkConcept T> std::shared_ptr<T> addLink(glm::vec3, glm::vec3); + template<RailLinkConcept T> std::shared_ptr<T> addLink(glm::vec3, glm::vec3, glm::vec2); private: using Nodes = std::set<NodePtr, PtrSorter<NodePtr>>; |