From b400ca4b75c70b5e6937fd5d6541a99106bc04a1 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Mon, 7 Apr 2014 06:29:32 +0000 Subject: [PATCH] added Mirror function --- vcg/space/plane3.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vcg/space/plane3.h b/vcg/space/plane3.h index 8ee8dbef..eeaee2bc 100644 --- a/vcg/space/plane3.h +++ b/vcg/space/plane3.h @@ -116,7 +116,14 @@ public: ScalarType k = p.dot(_dir) - _offset; return p - _dir * k; } - + + ///Mirror the point wrt the plane + PointType Mirror(const PointType &p) const { + PointType mirr=Projection(p); + mirr+=mirr-p; + return mirr; + } + /// Function to normalize direction void Normalize() { _dir.Normalize();