summaryrefslogtreecommitdiff
path: root/game/vehicles/railVehicle.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-05-07 01:41:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-05-07 01:41:31 +0100
commit9ab2aad4aa00afe3373b3a779377fa049459fb4d (patch)
tree18bf013e3be660b0769cd1a601e670eb79355324 /game/vehicles/railVehicle.h
parentRename strings.h to something that won't conflict with a system header (diff)
parentTemplated BufferedLocation and single buffer storage for RVC locations (diff)
downloadilt-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.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>;