Make sure that HyperPlane::transform manitains a unit normal vector in the Affine case.

(grafted from f5d644b415
)
This commit is contained in:
Gael Guennebaud
2016-12-20 09:35:00 +01:00
parent 26197bb467
commit eda635bd58
2 changed files with 6 additions and 0 deletions

View File

@@ -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