diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-07 01:41:31 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-07 01:41:31 +0100 |
commit | 9ab2aad4aa00afe3373b3a779377fa049459fb4d (patch) | |
tree | 18bf013e3be660b0769cd1a601e670eb79355324 /game/vehicles/railVehicle.h | |
parent | Rename strings.h to something that won't conflict with a system header (diff) | |
parent | Templated BufferedLocation and single buffer storage for RVC locations (diff) | |
download | ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.bz2 ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.tar.xz ilt-9ab2aad4aa00afe3373b3a779377fa049459fb4d.zip |
Merge branch 'containers'
Diffstat (limited to 'game/vehicles/railVehicle.h')
-rw-r--r-- | game/vehicles/railVehicle.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/game/vehicles/railVehicle.h b/game/vehicles/railVehicle.h index 247bf66..f34643e 100644 --- a/game/vehicles/railVehicle.h +++ b/game/vehicles/railVehicle.h @@ -8,12 +8,10 @@ #include <memory> #include <utility> -class SceneShader; -class ShadowMapper; class Ray; - class Train; -class RailVehicle : Selectable { + +class RailVehicle : Selectable, RailVehicleClass::Instance { public: explicit RailVehicle(RailVehicleClassPtr rvc); @@ -22,7 +20,9 @@ public: [[nodiscard]] bool intersectRay(const Ray &, glm::vec2 *, float *) const override; RailVehicleClassPtr rvClass; - BufferedLocation location; - std::array<BufferedLocation, 2> bogies; + using LV = RailVehicleClass::LocationVertex; + using BLocation = BufferedLocationT<glm::mat4 LV::*, RailVehicleClass::Instance &>; + BLocation location; + std::array<BLocation, 2> bogies; }; using RailVehiclePtr = std::unique_ptr<RailVehicle>; |