summaryrefslogtreecommitdiff
path: root/game/network/link.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/network/link.h')
-rw-r--r--game/network/link.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/game/network/link.h b/game/network/link.h
index 51c29ff..d9629de 100644
--- a/game/network/link.h
+++ b/game/network/link.h
@@ -9,6 +9,8 @@
#include <utility>
#include <vector>
+class Ray;
+
// Generic network node
// something that can be travelled to
// it has location
@@ -47,6 +49,7 @@ public:
NO_MOVE(Link);
[[nodiscard]] virtual Location positionAt(float dist, unsigned char start) const = 0;
+ [[nodiscard]] virtual bool intersectRay(const Ray &) const = 0;
std::array<End, 2> ends;
float length;
@@ -70,6 +73,7 @@ public:
NO_MOVE(LinkStraight);
[[nodiscard]] Location positionAt(float dist, unsigned char start) const override;
+ [[nodiscard]] bool intersectRay(const Ray &) const override;
};
LinkStraight::~LinkStraight() = default;
@@ -81,6 +85,7 @@ public:
NO_MOVE(LinkCurve);
[[nodiscard]] Location positionAt(float dist, unsigned char start) const override;
+ [[nodiscard]] bool intersectRay(const Ray &) const override;
glm::vec3 centreBase;
float radius;