summaryrefslogtreecommitdiff
path: root/game/network/link.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-07 02:51:42 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-07 02:51:42 +0000
commitd6e99a696aa582b81018078b68f6600c8030d643 (patch)
tree5c1451bbc76c31f78ddd169fca7780a0943f5910 /game/network/link.h
parentReformat with new clang-format (diff)
downloadilt-d6e99a696aa582b81018078b68f6600c8030d643.tar.bz2
ilt-d6e99a696aa582b81018078b68f6600c8030d643.tar.xz
ilt-d6e99a696aa582b81018078b68f6600c8030d643.zip
WIP typedefing all the things - headers
Diffstat (limited to 'game/network/link.h')
-rw-r--r--game/network/link.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/game/network/link.h b/game/network/link.h
index 0d66c42..78d3e91 100644
--- a/game/network/link.h
+++ b/game/network/link.h
@@ -17,12 +17,12 @@ class Ray;
// it has location
class Node : public StdTypeDefs<Node> {
public:
- explicit Node(glm::vec3 p) noexcept : pos(p) {};
+ explicit Node(Position3D p) noexcept : pos(p) {};
virtual ~Node() noexcept = default;
NO_COPY(Node);
NO_MOVE(Node);
- glm::vec3 pos;
+ Position3D pos;
};
// Generic network link
@@ -51,14 +51,14 @@ public:
float length;
protected:
- [[nodiscard]] virtual glm::vec3
+ [[nodiscard]] virtual Position3D
vehiclePositionOffset() const
{
return {};
}
};
-bool operator<(const glm::vec3 & a, const glm::vec3 & b);
+bool operator<(const Position3D & a, const Position3D & b);
bool operator<(const Node & a, const Node & b);
class LinkStraight : public virtual Link {
@@ -77,14 +77,14 @@ LinkStraight::~LinkStraight() = default;
class LinkCurve : public virtual Link {
public:
inline ~LinkCurve() override = 0;
- LinkCurve(glm::vec3, float, Arc);
+ LinkCurve(Position3D, float, Arc);
NO_COPY(LinkCurve);
NO_MOVE(LinkCurve);
[[nodiscard]] Location positionAt(float dist, unsigned char start) const override;
[[nodiscard]] bool intersectRay(const Ray &) const override;
- glm::vec3 centreBase;
+ Position3D centreBase;
float radius;
Arc arc;
};