From c274ac05690b34ba05b41d6e7864e6a663c73c1a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 10 Mar 2021 00:53:08 +0000 Subject: Push RailLinks functionality into new base classes Network and NetworkOf<> --- game/network/rail.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'game/network/rail.h') diff --git a/game/network/rail.h b/game/network/rail.h index 4460fcd..1d0ef68 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -7,17 +7,16 @@ #include "gfx/models/vertex.hpp" #include "gfx/renderable.h" #include "link.h" +#include "network.h" #include #include #include #include #include -#include #include #include class Shader; -class Texture; // A piece of rail track class RailLink : public Link, public Renderable { @@ -57,7 +56,7 @@ private: template concept RailLinkConcept = std::is_base_of_v; -class RailLinks : public Renderable, public WorldObject { +class RailLinks : public NetworkOf, public WorldObject { public: RailLinks(); template @@ -72,16 +71,10 @@ public: } std::shared_ptr addLinksBetween(glm::vec3 start, glm::vec3 end); - [[nodiscard]] NodePtr findNodeAt(glm::vec3) const; private: - using Nodes = std::set>; - Collection links; - Nodes nodes; - void render(const Shader &) const override; void tick(TickDuration elapsed) override; void joinLinks(const LinkPtr &) const; - std::shared_ptr texture; }; #endif -- cgit v1.2.3