diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-07 13:23:27 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-07 13:23:27 +0000 |
commit | 108bf5b2424da06aa2e1735ffd10a2b713834db8 (patch) | |
tree | af0918a6a266aa7e6ee1d8129df6d5ef9fc4f8ab /ui/builders | |
parent | Remove more use of legacy types and unnecessary pointers from selectable inte... (diff) | |
parent | Remove Position3D from RailVehicle (diff) | |
download | ilt-108bf5b2424da06aa2e1735ffd10a2b713834db8.tar.bz2 ilt-108bf5b2424da06aa2e1735ffd10a2b713834db8.tar.xz ilt-108bf5b2424da06aa2e1735ffd10a2b713834db8.zip |
Merge branch 'template-types'
Diffstat (limited to 'ui/builders')
-rw-r--r-- | ui/builders/freeExtend.cpp | 6 | ||||
-rw-r--r-- | ui/builders/freeExtend.h | 6 | ||||
-rw-r--r-- | ui/builders/join.cpp | 5 | ||||
-rw-r--r-- | ui/builders/join.h | 6 | ||||
-rw-r--r-- | ui/builders/straight.cpp | 6 | ||||
-rw-r--r-- | ui/builders/straight.h | 6 |
6 files changed, 23 insertions, 12 deletions
diff --git a/ui/builders/freeExtend.cpp b/ui/builders/freeExtend.cpp index 1520421..47356c3 100644 --- a/ui/builders/freeExtend.cpp +++ b/ui/builders/freeExtend.cpp @@ -11,7 +11,8 @@ BuilderFreeExtend::hint() const } void -BuilderFreeExtend::move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent &, const Ray & ray) +BuilderFreeExtend::move( + Network * network, const GeoData * geoData, const SDL_MouseMotionEvent &, const Ray<GlobalPosition3D> & ray) { if (p1) { if (const auto p = network->intersectRayNodes(ray)) { @@ -30,7 +31,8 @@ BuilderFreeExtend::move(Network * network, const GeoData * geoData, const SDL_Mo } void -BuilderFreeExtend::click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray & ray) +BuilderFreeExtend::click( + Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray<GlobalPosition3D> & ray) { switch (e.button) { case SDL_BUTTON_LEFT: diff --git a/ui/builders/freeExtend.h b/ui/builders/freeExtend.h index b276426..127fdc6 100644 --- a/ui/builders/freeExtend.h +++ b/ui/builders/freeExtend.h @@ -6,8 +6,10 @@ class GeoData; class BuilderFreeExtend : public EditNetwork::Builder { std::string hint() const override; - void click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray & ray) override; - void move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent & e, const Ray & ray) override; + void click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, + const Ray<GlobalPosition3D> & ray) override; + void move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent & e, + const Ray<GlobalPosition3D> & ray) override; std::optional<Position3D> p1; }; diff --git a/ui/builders/join.cpp b/ui/builders/join.cpp index caa635f..7474c5b 100644 --- a/ui/builders/join.cpp +++ b/ui/builders/join.cpp @@ -11,7 +11,7 @@ BuilderJoin::hint() const } void -BuilderJoin::move(Network * network, const GeoData *, const SDL_MouseMotionEvent &, const Ray & ray) +BuilderJoin::move(Network * network, const GeoData *, const SDL_MouseMotionEvent &, const Ray<GlobalPosition3D> & ray) { if (p1) { if (const auto p = network->intersectRayNodes(ray)) { @@ -24,7 +24,8 @@ BuilderJoin::move(Network * network, const GeoData *, const SDL_MouseMotionEvent } void -BuilderJoin::click(Network * network, const GeoData *, const SDL_MouseButtonEvent & e, const Ray & ray) +BuilderJoin::click( + Network * network, const GeoData *, const SDL_MouseButtonEvent & e, const Ray<GlobalPosition3D> & ray) { switch (e.button) { case SDL_BUTTON_LEFT: diff --git a/ui/builders/join.h b/ui/builders/join.h index bb0bd4c..dd57895 100644 --- a/ui/builders/join.h +++ b/ui/builders/join.h @@ -6,8 +6,10 @@ class GeoData; class BuilderJoin : public EditNetwork::Builder { std::string hint() const override; - void click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray & ray) override; - void move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent & e, const Ray & ray) override; + void click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, + const Ray<GlobalPosition3D> & ray) override; + void move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent & e, + const Ray<GlobalPosition3D> & ray) override; void create(Network * network, const Node::Ptr & p1, const Node::Ptr & p2) const; diff --git a/ui/builders/straight.cpp b/ui/builders/straight.cpp index 9b262bb..866705a 100644 --- a/ui/builders/straight.cpp +++ b/ui/builders/straight.cpp @@ -11,7 +11,8 @@ BuilderStraight::hint() const } void -BuilderStraight::move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent &, const Ray & ray) +BuilderStraight::move( + Network * network, const GeoData * geoData, const SDL_MouseMotionEvent &, const Ray<GlobalPosition3D> & ray) { if (p1) { if (const auto p = geoData->intersectRay(ray)) { @@ -24,7 +25,8 @@ BuilderStraight::move(Network * network, const GeoData * geoData, const SDL_Mous } void -BuilderStraight::click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray & ray) +BuilderStraight::click( + Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray<GlobalPosition3D> & ray) { switch (e.button) { case SDL_BUTTON_LEFT: diff --git a/ui/builders/straight.h b/ui/builders/straight.h index cf99a1d..63f9a40 100644 --- a/ui/builders/straight.h +++ b/ui/builders/straight.h @@ -6,8 +6,10 @@ class GeoData; class BuilderStraight : public EditNetwork::Builder { std::string hint() const override; - void click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, const Ray & ray) override; - void move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent & e, const Ray & ray) override; + void click(Network * network, const GeoData * geoData, const SDL_MouseButtonEvent & e, + const Ray<GlobalPosition3D> & ray) override; + void move(Network * network, const GeoData * geoData, const SDL_MouseMotionEvent & e, + const Ray<GlobalPosition3D> & ray) override; void create(Network * network, Position3D p1, Position3D p2) const; |