From 8033e2da23472217a363fec6536aac3d6f297d69 Mon Sep 17 00:00:00 2001 From: Martin Heistermann Date: Wed, 21 Dec 2016 18:31:46 +0100 Subject: [PATCH] QuadricT: implement Q+Q and Q*scalar operators for convenience. --- src/OpenMesh/Core/Geometry/QuadricT.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/OpenMesh/Core/Geometry/QuadricT.hh b/src/OpenMesh/Core/Geometry/QuadricT.hh index b211cc49..fdec0c9c 100644 --- a/src/OpenMesh/Core/Geometry/QuadricT.hh +++ b/src/OpenMesh/Core/Geometry/QuadricT.hh @@ -180,6 +180,12 @@ public: return *this; } + QuadricT operator+(const QuadricT& _other ) const + { + QuadricT result = *this; + return result += _other; + } + /// multiply by scalar QuadricT& operator*=( Scalar _s) @@ -191,6 +197,11 @@ public: return *this; } + QuadricT operator*(Scalar _s) const + { + QuadricT result = *this; + return result *= _s; + } /// multiply 4D vector from right: Q*v template