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

This commit is contained in:
Gael Guennebaud
2016-12-20 09:35:00 +01:00
parent 18038fc829
commit 1ded6bf3fa
2 changed files with 6 additions and 0 deletions

View File

@@ -218,7 +218,10 @@ public:
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