diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-11 17:37:57 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-11 17:37:57 +0000 |
commit | 5e25d79beef19c39537b0f15982a175fec45bb3e (patch) | |
tree | 011cdd78c661757bab03cfd8ede11e6a58047968 /gfx/gl/bufferedLocation.cpp | |
parent | Add BufferedLocation method for getting the rotation only transform (diff) | |
download | ilt-5e25d79beef19c39537b0f15982a175fec45bb3e.tar.bz2 ilt-5e25d79beef19c39537b0f15982a175fec45bb3e.tar.xz ilt-5e25d79beef19c39537b0f15982a175fec45bb3e.zip |
Refactor BufferedLocationT to use a callback
Simplifies customisation in the face of multiple fields
Diffstat (limited to 'gfx/gl/bufferedLocation.cpp')
-rw-r--r-- | gfx/gl/bufferedLocation.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gfx/gl/bufferedLocation.cpp b/gfx/gl/bufferedLocation.cpp index 6ba8812..412e3ab 100644 --- a/gfx/gl/bufferedLocation.cpp +++ b/gfx/gl/bufferedLocation.cpp @@ -1,6 +1,5 @@ #include "bufferedLocation.h" #include "location.h" -#include "maths.h" #include <glm/gtx/transform.hpp> BufferedLocation::BufferedLocation(Position3D p, Rotation3D r) : BufferedLocation {Location {p, r}} { } @@ -69,3 +68,9 @@ BufferedLocation::getRotationTransform() const { return loc.getRotationTransform(); } + +void +BufferedLocationUpdater::updateBuffer() const +{ + onUpdate(this); +} |