summaryrefslogtreecommitdiff
path: root/game/vehicles/railVehicle.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-06 16:42:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-06 16:42:08 +0100
commit72ab29786f6d4c97a92cb95c75091537490e2d0f (patch)
tree18bf013e3be660b0769cd1a601e670eb79355324 /game/vehicles/railVehicle.h
parentRefactor InstanceVertices in terms of glContainer (diff)
downloadilt-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.h12
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>;