summaryrefslogtreecommitdiff
path: root/gfx/gl/bufferedLocation.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-04-03 12:04:14 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2026-04-03 12:04:14 +0100
commit4d04572e48950493ce85255d181be43967f362fd (patch)
treef74d055f151472cda3fa3fc0f760eb6219dd9fad /gfx/gl/bufferedLocation.cpp
parentUse std::chrono for worldTime (diff)
parentFix direction of difference vector calculating railVehicle new position (diff)
downloadilt-4d04572e48950493ce85255d181be43967f362fd.tar.bz2
ilt-4d04572e48950493ce85255d181be43967f362fd.tar.xz
ilt-4d04572e48950493ce85255d181be43967f362fd.zip
Merge branch 'shared-locations'
Diffstat (limited to 'gfx/gl/bufferedLocation.cpp')
-rw-r--r--gfx/gl/bufferedLocation.cpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/gfx/gl/bufferedLocation.cpp b/gfx/gl/bufferedLocation.cpp
deleted file mode 100644
index f1bedfe..0000000
--- a/gfx/gl/bufferedLocation.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "bufferedLocation.h"
-#include "location.h"
-#include <glm/gtx/transform.hpp>
-
-BufferedLocation::BufferedLocation(GlobalPosition3D p, Rotation3D r) : BufferedLocation {Location {p, r}} { }
-
-BufferedLocation::BufferedLocation(const Location & l) : loc {l} { }
-
-BufferedLocation::operator const Location &() const
-{
- return loc;
-}
-
-BufferedLocation &
-BufferedLocation::operator=(const Location & l)
-{
- loc = l;
- updateBuffer();
- return *this;
-}
-
-GlobalPosition3D
-BufferedLocation::position() const
-{
- return loc.pos;
-}
-
-Rotation3D
-BufferedLocation::rotation() const
-{
- return loc.rot;
-}
-
-void
-BufferedLocation::setPosition(GlobalPosition3D p, bool update)
-{
- loc.pos = p;
- if (update) {
- updateBuffer();
- }
-}
-
-void
-BufferedLocation::setRotation(Rotation3D r, bool update)
-{
- loc.rot = r;
- if (update) {
- updateBuffer();
- }
-}
-
-void
-BufferedLocation::setLocation(GlobalPosition3D p, Rotation3D r)
-{
- loc.pos = p;
- loc.rot = r;
- updateBuffer();
-}
-
-glm::mat4
-BufferedLocation::getRotationTransform() const
-{
- return loc.getRotationTransform();
-}
-
-void
-BufferedLocationUpdater::updateBuffer() const
-{
- onUpdate(this);
-}