aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-12-20 09:35:00 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-12-20 09:35:00 +0100
commitf5d644b4155e2cbf2a03988c2ef592a3d2857031 (patch)
treef3ba11f58b40c34775a7bea31d2223270b3972d5 /Eigen
parent27ceb43bf6b06dda898e5d027097f33a970f7355 (diff)
Make sure that HyperPlane::transform manitains a unit normal vector in the Affine case.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Geometry/Hyperplane.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/Geometry/Hyperplane.h b/Eigen/src/Geometry/Hyperplane.h
index 07f2659b2..05929b299 100644
--- a/Eigen/src/Geometry/Hyperplane.h
+++ b/Eigen/src/Geometry/Hyperplane.h
@@ -217,7 +217,10 @@ public:
EIGEN_DEVICE_FUNC inline Hyperplane& transform(const MatrixBase<XprType>& mat, TransformTraits traits = Affine)
{
if (traits==Affine)
+ {
normal() = mat.inverse().transpose() * normal();
+ m_coeffs /= normal().norm();
+ }
else if (traits==Isometry)
normal() = mat * normal();
else