aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2014-02-04 07:02:34 +0100
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2014-02-04 07:02:34 +0100
commit6c527bd811a4bbb122093fcc9ba9b7bd86963855 (patch)
treeedc18af74325170428a5a0270b1e543768ba5f12 /Eigen
parente722f36ffa80f131e19428bab275dbc2df522093 (diff)
Fixed assignment from QMatrix to Transform for compact storage.
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Geometry/Transform.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h
index 419f90148..020868103 100644
--- a/Eigen/src/Geometry/Transform.h
+++ b/Eigen/src/Geometry/Transform.h
@@ -699,9 +699,13 @@ template<typename Scalar, int Dim, int Mode,int Options>
Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QMatrix& other)
{
EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)
- m_matrix << other.m11(), other.m21(), other.dx(),
- other.m12(), other.m22(), other.dy(),
- 0, 0, 1;
+ if (Mode == int(AffineCompact))
+ m_matrix << other.m11(), other.m21(), other.dx(),
+ other.m12(), other.m22(), other.dy();
+ else
+ m_matrix << other.m11(), other.m21(), other.dx(),
+ other.m12(), other.m22(), other.dy(),
+ 0, 0, 1;
return *this;
}