summaryrefslogtreecommitdiff
path: root/game/network/rail.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-05 18:53:45 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-05 18:53:45 +0000
commite40b6bfe346bb93a2d3b38745b8fddba40e759c6 (patch)
tree1ad5746d5b49f12fe47e918e5c7d9c392c4e3e8d /game/network/rail.h
parentInitial commit generating some basic rail network (diff)
downloadilt-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.h9
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>>;