From e118b1f5d8071460e3a9d4d731c6d69221f785dc Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 Mar 2021 19:44:58 +0000 Subject: Carve up the mess in game/vehicles --- game/vehicles/linkHistory.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 game/vehicles/linkHistory.h (limited to 'game/vehicles/linkHistory.h') diff --git a/game/vehicles/linkHistory.h b/game/vehicles/linkHistory.h new file mode 100644 index 0000000..31d0023 --- /dev/null +++ b/game/vehicles/linkHistory.h @@ -0,0 +1,21 @@ +#ifndef LINKHISTORY_H +#define LINKHISTORY_H + +#include +#include +#include + +class LinkHistory { +public: + using WEntry = std::pair; + using Entry = std::pair; + Entry add(const LinkWPtr &, unsigned char); + [[nodiscard]] Entry getCurrent() const; + [[nodiscard]] Entry getAt(float, float *) const; + +private: + std::vector links; + float totalLen {0.F}; +}; + +#endif -- cgit v1.2.3