mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Fixed assignment from QMatrix to Transform for compact storage.
This commit is contained in:
parent
e722f36ffa
commit
6c527bd811
@ -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)
|
Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QMatrix& other)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)
|
EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)
|
||||||
m_matrix << other.m11(), other.m21(), other.dx(),
|
if (Mode == int(AffineCompact))
|
||||||
other.m12(), other.m22(), other.dy(),
|
m_matrix << other.m11(), other.m21(), other.dx(),
|
||||||
0, 0, 1;
|
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;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user