diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-01 22:03:10 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-01 22:03:10 +0000 |
commit | 423328de708ffa93961c329de13445ce2da6e328 (patch) | |
tree | 6b4500d0d6af5ee5bff967233d82bfae078b279c /game/vehicles/railVehicle.cpp | |
parent | Remove more use of legacy types from camera controller (diff) | |
download | ilt-423328de708ffa93961c329de13445ce2da6e328.tar.bz2 ilt-423328de708ffa93961c329de13445ce2da6e328.tar.xz ilt-423328de708ffa93961c329de13445ce2da6e328.zip |
Remove more use of legacy types and unnecessary pointers from selectable interface
Diffstat (limited to 'game/vehicles/railVehicle.cpp')
-rw-r--r-- | game/vehicles/railVehicle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp index 7e4b1ee..6653333 100644 --- a/game/vehicles/railVehicle.cpp +++ b/game/vehicles/railVehicle.cpp @@ -44,7 +44,7 @@ RailVehicle::move(const Train * t, float & trailBy) } bool -RailVehicle::intersectRay(const Ray & ray, BaryPosition * baryPos, float * distance) const +RailVehicle::intersectRay(const Ray & ray, BaryPosition & baryPos, RelativeDistance & distance) const { constexpr const auto X = 1350.F; const auto Y = this->rvClass->length / 2.F; @@ -80,6 +80,6 @@ RailVehicle::intersectRay(const Ray & ray, BaryPosition * baryPos, float * dista return std::any_of( triangles.begin(), triangles.end(), [&cornerVertices, &ray, &baryPos, &distance](const auto & idx) { return glm::intersectRayTriangle(ray.start, ray.direction, cornerVertices[idx[0]], - cornerVertices[idx[1]], cornerVertices[idx[2]], *baryPos, *distance); + cornerVertices[idx[1]], cornerVertices[idx[2]], baryPos, distance); }); } |