diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-06 16:42:08 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-06 16:42:08 +0100 |
commit | 72ab29786f6d4c97a92cb95c75091537490e2d0f (patch) | |
tree | 18bf013e3be660b0769cd1a601e670eb79355324 /game/vehicles/railVehicle.h | |
parent | Refactor InstanceVertices in terms of glContainer (diff) | |
download | ilt-72ab29786f6d4c97a92cb95c75091537490e2d0f.tar.bz2 ilt-72ab29786f6d4c97a92cb95c75091537490e2d0f.tar.xz ilt-72ab29786f6d4c97a92cb95c75091537490e2d0f.zip |
Templated BufferedLocation and single buffer storage for RVC locations
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>; |