From 47784c84f51891a5ab99aa363f231b8267773ce6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 Mar 2021 17:35:05 +0000 Subject: Push lots of stuff into rail vehicle class Derives lots more info directly from the model --- game/vehicles/railloco.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'game/vehicles/railloco.h') diff --git a/game/vehicles/railloco.h b/game/vehicles/railloco.h index 88f9503..1bc0a51 100644 --- a/game/vehicles/railloco.h +++ b/game/vehicles/railloco.h @@ -5,20 +5,30 @@ #include #include #include +#include #include #include class Shader; class Texture; +class ObjParser; class RailVehicleClass { public: + explicit RailVehicleClass(const std::string & name); + void render(const Shader &, const Location &, const std::array &) const; + std::array bogies; MeshPtr bodyMesh; std::shared_ptr texture; float wheelBase; float length; + +private: + RailVehicleClass(std::unique_ptr obj, std::shared_ptr); + static float bogieOffset(ObjParser & o); + static float objectLength(ObjParser & o); }; using RailVehicleClassPtr = std::shared_ptr; -- cgit v1.2.3