mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-30 02:03:14 +08:00
s/Affine/Linear, thanks to Thomas Vaughan
This commit is contained in:
parent
f0394edfa7
commit
e0f627a7db
@ -66,9 +66,9 @@ public:
|
|||||||
/** type of the matrix used to represent the transformation */
|
/** type of the matrix used to represent the transformation */
|
||||||
typedef Matrix<Scalar,HDim,HDim> MatrixType;
|
typedef Matrix<Scalar,HDim,HDim> MatrixType;
|
||||||
/** type of the matrix used to represent the linear part of the transformation */
|
/** type of the matrix used to represent the linear part of the transformation */
|
||||||
typedef Matrix<Scalar,Dim,Dim> AffineMatrixType;
|
typedef Matrix<Scalar,Dim,Dim> LinearMatrixType;
|
||||||
/** type of read/write reference to the linear part of the transformation */
|
/** type of read/write reference to the linear part of the transformation */
|
||||||
typedef Block<MatrixType,Dim,Dim> AffinePart;
|
typedef Block<MatrixType,Dim,Dim> LinearPart;
|
||||||
/** type of a vector */
|
/** type of a vector */
|
||||||
typedef Matrix<Scalar,Dim,1> VectorType;
|
typedef Matrix<Scalar,Dim,1> VectorType;
|
||||||
/** type of a read/write reference to the translation part of the rotation */
|
/** type of a read/write reference to the translation part of the rotation */
|
||||||
@ -111,9 +111,9 @@ public:
|
|||||||
inline MatrixType& matrix() { return m_matrix; }
|
inline MatrixType& matrix() { return m_matrix; }
|
||||||
|
|
||||||
/** \returns a read-only expression of the linear (linear) part of the transformation */
|
/** \returns a read-only expression of the linear (linear) part of the transformation */
|
||||||
inline const AffinePart linear() const { return m_matrix.template block<Dim,Dim>(0,0); }
|
inline const LinearPart linear() const { return m_matrix.template block<Dim,Dim>(0,0); }
|
||||||
/** \returns a writable expression of the linear (linear) part of the transformation */
|
/** \returns a writable expression of the linear (linear) part of the transformation */
|
||||||
inline AffinePart linear() { return m_matrix.template block<Dim,Dim>(0,0); }
|
inline LinearPart linear() { return m_matrix.template block<Dim,Dim>(0,0); }
|
||||||
|
|
||||||
/** \returns a read-only expression of the translation vector of the transformation */
|
/** \returns a read-only expression of the translation vector of the transformation */
|
||||||
inline const TranslationPart translation() const { return m_matrix.template block<Dim,1>(0,Dim); }
|
inline const TranslationPart translation() const { return m_matrix.template block<Dim,1>(0,Dim); }
|
||||||
@ -162,8 +162,8 @@ public:
|
|||||||
Transform& shear(Scalar sx, Scalar sy);
|
Transform& shear(Scalar sx, Scalar sy);
|
||||||
Transform& preshear(Scalar sx, Scalar sy);
|
Transform& preshear(Scalar sx, Scalar sy);
|
||||||
|
|
||||||
AffineMatrixType extractRotation() const;
|
LinearMatrixType extractRotation() const;
|
||||||
AffineMatrixType extractRotationNoShear() const;
|
LinearMatrixType extractRotationNoShear() const;
|
||||||
|
|
||||||
template<typename PositionDerived, typename OrientationType, typename ScaleDerived>
|
template<typename PositionDerived, typename OrientationType, typename ScaleDerived>
|
||||||
Transform& fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,
|
Transform& fromPositionOrientationScale(const MatrixBase<PositionDerived> &position,
|
||||||
@ -349,7 +349,7 @@ Transform<Scalar,Dim>&
|
|||||||
Transform<Scalar,Dim>::preshear(Scalar sx, Scalar sy)
|
Transform<Scalar,Dim>::preshear(Scalar sx, Scalar sy)
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT(int(Dim)==2, you_did_a_programming_error);
|
EIGEN_STATIC_ASSERT(int(Dim)==2, you_did_a_programming_error);
|
||||||
m_matrix.template block<Dim,HDim>(0,0) = AffineMatrixType(1, sx, sy, 1) * m_matrix.template block<Dim,HDim>(0,0);
|
m_matrix.template block<Dim,HDim>(0,0) = LinearMatrixType(1, sx, sy, 1) * m_matrix.template block<Dim,HDim>(0,0);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +357,7 @@ Transform<Scalar,Dim>::preshear(Scalar sx, Scalar sy)
|
|||||||
* \sa extractRotationNoShear(), class QR
|
* \sa extractRotationNoShear(), class QR
|
||||||
*/
|
*/
|
||||||
template<typename Scalar, int Dim>
|
template<typename Scalar, int Dim>
|
||||||
typename Transform<Scalar,Dim>::AffineMatrixType
|
typename Transform<Scalar,Dim>::LinearMatrixType
|
||||||
Transform<Scalar,Dim>::extractRotation() const
|
Transform<Scalar,Dim>::extractRotation() const
|
||||||
{
|
{
|
||||||
return linear().qr().matrixQ();
|
return linear().qr().matrixQ();
|
||||||
@ -368,7 +368,7 @@ Transform<Scalar,Dim>::extractRotation() const
|
|||||||
* \sa extractRotation()
|
* \sa extractRotation()
|
||||||
*/
|
*/
|
||||||
template<typename Scalar, int Dim>
|
template<typename Scalar, int Dim>
|
||||||
typename Transform<Scalar,Dim>::AffineMatrixType
|
typename Transform<Scalar,Dim>::LinearMatrixType
|
||||||
Transform<Scalar,Dim>::extractRotationNoShear() const
|
Transform<Scalar,Dim>::extractRotationNoShear() const
|
||||||
{
|
{
|
||||||
return linear().cwise().abs2()
|
return linear().cwise().abs2()
|
||||||
@ -421,7 +421,7 @@ struct ei_transform_product_impl<Other,Dim,HDim, Dim,1>
|
|||||||
{
|
{
|
||||||
typedef typename Other::Scalar Scalar;
|
typedef typename Other::Scalar Scalar;
|
||||||
typedef Transform<Scalar,Dim> TransformType;
|
typedef Transform<Scalar,Dim> TransformType;
|
||||||
typedef typename TransformType::AffinePart MatrixType;
|
typedef typename TransformType::LinearPart MatrixType;
|
||||||
typedef const CwiseUnaryOp<
|
typedef const CwiseUnaryOp<
|
||||||
ei_scalar_multiple_op<Scalar>,
|
ei_scalar_multiple_op<Scalar>,
|
||||||
NestByValue<CwiseBinaryOp<
|
NestByValue<CwiseBinaryOp<
|
||||||
|
Loading…
x
Reference in New Issue
Block a user