From de9909df038d1b6bb47bcc82fea5f8dc9dec2491 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 28 Dec 2021 15:42:50 +0000 Subject: Initial implementation for being able to click in the main window to select something --- game/vehicles/railVehicle.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'game/vehicles/railVehicle.h') diff --git a/game/vehicles/railVehicle.h b/game/vehicles/railVehicle.h index a089f1d..55cb6a2 100644 --- a/game/vehicles/railVehicle.h +++ b/game/vehicles/railVehicle.h @@ -4,6 +4,8 @@ #include "gfx/renderable.h" #include "railVehicleClass.h" #include +#include +#include #include #include #include @@ -11,13 +13,14 @@ class Shader; class Train; -class RailVehicle : public Renderable { +class RailVehicle : public Renderable, Selectable { public: explicit RailVehicle(RailVehicleClassPtr rvc) : rvClass {std::move(rvc)} { } void move(const Train *, float & trailBy); void render(const Shader & shader) const override; + [[nodiscard]] bool intersectRay(const glm::vec3 &, const glm::vec3 &, glm::vec2 *, float *) const override; Location location; -- cgit v1.2.3