diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-13 00:17:11 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-13 00:17:11 +0000 |
commit | 356e874050e5ad5af87b04a2bb01ce34a86640bb (patch) | |
tree | c3f2a5d548340821378f6d79b03c81bd63382282 /game/vehicles/railVehicle.cpp | |
parent | Refactor BufferedLocationT to use a callback (diff) | |
download | ilt-356e874050e5ad5af87b04a2bb01ce34a86640bb.tar.bz2 ilt-356e874050e5ad5af87b04a2bb01ce34a86640bb.tar.xz ilt-356e874050e5ad5af87b04a2bb01ce34a86640bb.zip |
Send position and rotation matrix to GPU separately
Diffstat (limited to 'game/vehicles/railVehicle.cpp')
-rw-r--r-- | game/vehicles/railVehicle.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/game/vehicles/railVehicle.cpp b/game/vehicles/railVehicle.cpp index 1ed904d..6e6e18f 100644 --- a/game/vehicles/railVehicle.cpp +++ b/game/vehicles/railVehicle.cpp @@ -14,15 +14,18 @@ RailVehicle::RailVehicle(RailVehicleClassPtr rvc) : RailVehicleClass::Instance {rvc->instances.acquire()}, rvClass {std::move(rvc)}, location {[this](const BufferedLocation * l) { - this->get()->body = l->getTransform(); + this->get()->body = l->getRotationTransform(); + this->get()->bodyPos = l->position(); }}, bogies {{ {[this](const BufferedLocation * l) { - this->get()->front = l->getTransform(); + this->get()->front = l->getRotationTransform(); + this->get()->frontPos = l->position(); }, Position3D {0, rvClass->wheelBase / 2.F, 0}}, {[this](const BufferedLocation * l) { - this->get()->back = l->getTransform(); + this->get()->back = l->getRotationTransform(); + this->get()->backPos = l->position(); }, Position3D {0, -rvClass->wheelBase / 2.F, 0}}, }} |