From 0aa665c3648d788755b00c9e431c872d57fddbb8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 25 Nov 2023 16:28:39 +0000 Subject: 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 --- gfx/gl/bufferedLocation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gfx/gl/bufferedLocation.cpp') 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 -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; -- cgit v1.2.3