diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-01 14:06:28 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-12-01 14:06:28 +0000 |
commit | d982157ee2711f2a28a8ca0dc5f882424626217c (patch) | |
tree | d78d02d82909a30224482395c8678b62f275d271 /game/geoData.h | |
parent | Constrained Arithmatic type concept (diff) | |
download | ilt-d982157ee2711f2a28a8ca0dc5f882424626217c.tar.bz2 ilt-d982157ee2711f2a28a8ca0dc5f882424626217c.tar.xz ilt-d982157ee2711f2a28a8ca0dc5f882424626217c.zip |
Remove GeoData::difference for points, use global version
Diffstat (limited to 'game/geoData.h')
-rw-r--r-- | game/geoData.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/game/geoData.h b/game/geoData.h index 71ec85f..dcc28e0 100644 --- a/game/geoData.h +++ b/game/geoData.h @@ -68,7 +68,7 @@ public: [[nodiscard]] Point operator*(BaryPosition bari) const { - return p(0) + (difference(p(0), p(1)) * bari.x) + (difference(p(0), p(2)) * bari.y); + return p(0) + (::difference(p(1), p(0)) * bari.x) + (::difference(p(2), p(0)) * bari.y); } [[nodiscard]] Point @@ -83,14 +83,14 @@ public: area() const requires(Dim == 3) { - return glm::length(crossProduct(difference(p(0), p(1)), difference(p(0), p(2)))) / 2.F; + return glm::length(crossProduct(::difference(p(1), p(0)), ::difference(p(2), p(0)))) / 2.F; } [[nodiscard]] Normal3D normal() const requires(Dim == 3) { - return crossProduct(difference(p(0), p(1)), difference(p(0), p(2))); + return crossProduct(::difference(p(1), p(0)), ::difference(p(2), p(0))); } [[nodiscard]] Normal3D @@ -190,13 +190,6 @@ protected: [[nodiscard]] HalfedgeHandle findBoundaryStart() const; [[nodiscard]] RelativePosition3D difference(const HalfedgeHandle) const; - template<glm::length_t D> - [[nodiscard]] static RelativePosition<D> - difference(const GlobalPosition<D> a, const GlobalPosition<D> b) - { - return b - a; - } - [[nodiscard]] RelativeDistance length(const HalfedgeHandle) const; [[nodiscard]] GlobalPosition3D centre(const HalfedgeHandle) const; |