summaryrefslogtreecommitdiff
path: root/game/vehicles/railVehicleClass.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/vehicles/railVehicleClass.h')
-rw-r--r--game/vehicles/railVehicleClass.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h
index 2fda8f7..80b3fda 100644
--- a/game/vehicles/railVehicleClass.h
+++ b/game/vehicles/railVehicleClass.h
@@ -18,6 +18,10 @@ public:
void render(const SceneShader & shader) const override;
void shadows(const ShadowMapper & shadowMapper) const override;
+ struct LocationVertex {
+ glm::mat4 body, front, back;
+ };
+
std::array<Mesh::Ptr, 2> bogies;
Mesh::Ptr bodyMesh;
std::shared_ptr<Texture> texture;
@@ -25,8 +29,8 @@ public:
float length;
float maxSpeed;
- mutable InstanceVertices<glm::mat4> instancesBody;
- mutable std::array<InstanceVertices<glm::mat4>, 2> instancesBogies;
+ mutable InstanceVertices<LocationVertex> instances;
+ using Instance = decltype(instances)::InstanceProxy;
protected:
friend Persistence::SelectionPtrBase<std::shared_ptr<RailVehicleClass>>;