mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-30 16:52:01 +08:00
Restore C++03 compatibility.
This commit is contained in:
parent
7893285e59
commit
157756130a
@ -985,8 +985,10 @@ Transform<Scalar,Dim,Mode,Options>::preshear(const Scalar& sx, const Scalar& sy)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT(int(Dim)==2, YOU_MADE_A_PROGRAMMING_MISTAKE)
|
||||
EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)
|
||||
m_matrix.template block<Dim, HDim>(0, 0) =
|
||||
LinearMatrixType({{1, sy}, {sx, 1}}) * m_matrix.template block<Dim, HDim>(0, 0);
|
||||
LinearMatrixType shear = LinearMatrixType::Identity(2, 2);
|
||||
shear.coeffRef(0, 1) = sy;
|
||||
shear.coeffRef(1, 0) = sx;
|
||||
m_matrix.template block<Dim, HDim>(0, 0) = shear * m_matrix.template block<Dim, HDim>(0, 0);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user