summaryrefslogtreecommitdiff
path: root/gfx/gl/bufferedLocation.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-25 16:28:39 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-25 16:28:39 +0000
commit0aa665c3648d788755b00c9e431c872d57fddbb8 (patch)
tree859dba97d3026db485813d808e8180ac94a0ed2a /gfx/gl/bufferedLocation.cpp
parentRemove getTransform (diff)
downloadilt-0aa665c3648d788755b00c9e431c872d57fddbb8.tar.bz2
ilt-0aa665c3648d788755b00c9e431c872d57fddbb8.tar.xz
ilt-0aa665c3648d788755b00c9e431c872d57fddbb8.zip
Model positions as integers
Introduces test failure in arcs due to rounding, but I don't want to create a complicated fix as link positions are still floats and hopefully that'll go away... somehow
Diffstat (limited to 'gfx/gl/bufferedLocation.cpp')
-rw-r--r--gfx/gl/bufferedLocation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gfx/gl/bufferedLocation.cpp b/gfx/gl/bufferedLocation.cpp
index 2a2e723..d6a63b9 100644
--- a/gfx/gl/bufferedLocation.cpp
+++ b/gfx/gl/bufferedLocation.cpp
@@ -2,7 +2,7 @@
#include "location.h"
#include <glm/gtx/transform.hpp>
-BufferedLocation::BufferedLocation(Position3D p, Rotation3D r) : BufferedLocation {Location {p, r}} { }
+BufferedLocation::BufferedLocation(GlobalPosition3D p, Rotation3D r) : BufferedLocation {Location {p, r}} { }
BufferedLocation::BufferedLocation(const Location & l) : loc {l} { }
@@ -19,7 +19,7 @@ BufferedLocation::operator=(const Location & l)
return *this;
}
-Position3D
+GlobalPosition3D
BufferedLocation::position() const
{
return loc.pos;
@@ -32,7 +32,7 @@ BufferedLocation::rotation() const
}
void
-BufferedLocation::setPosition(Position3D p, bool update)
+BufferedLocation::setPosition(GlobalPosition3D p, bool update)
{
loc.pos = p;
if (update) {
@@ -50,7 +50,7 @@ BufferedLocation::setRotation(Position3D r, bool update)
}
void
-BufferedLocation::setLocation(Position3D p, Rotation3D r)
+BufferedLocation::setLocation(GlobalPosition3D p, Rotation3D r)
{
loc.pos = p;
loc.rot = r;