summaryrefslogtreecommitdiff
path: root/game/vehicles/railloco.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/vehicles/railloco.h')
-rw-r--r--game/vehicles/railloco.h10
1 files changed, 10 insertions, 0 deletions
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 <array>
#include <location.hpp>
#include <memory>
+#include <string>
#include <utility>
#include <vector>
class Shader;
class Texture;
+class ObjParser;
class RailVehicleClass {
public:
+ explicit RailVehicleClass(const std::string & name);
+
void render(const Shader &, const Location &, const std::array<Location, 2> &) const;
+
std::array<MeshPtr, 2> bogies;
MeshPtr bodyMesh;
std::shared_ptr<Texture> texture;
float wheelBase;
float length;
+
+private:
+ RailVehicleClass(std::unique_ptr<ObjParser> obj, std::shared_ptr<Texture>);
+ static float bogieOffset(ObjParser & o);
+ static float objectLength(ObjParser & o);
};
using RailVehicleClassPtr = std::shared_ptr<RailVehicleClass>;