Represents an homogeneous transformation in a N dimensional space. More...
#include <Transform.h>
Classes | |
| struct | construct_from_matrix |
| struct | construct_from_matrix< OtherDerived, true > |
Public Types | |
| typedef Matrix< Scalar, Dim, Dim > | LinearMatrixType |
| typedef Block< MatrixType, Dim, Dim > | LinearPart |
| typedef Matrix< Scalar, HDim, HDim > | MatrixType |
| typedef _Scalar | Scalar |
| typedef Scaling< Scalar, Dim > | ScalingType |
| typedef Block< MatrixType, Dim, 1 > | TranslationPart |
| typedef Translation< Scalar, Dim > | TranslationType |
| typedef Matrix< Scalar, Dim, 1 > | VectorType |
Public Member Functions | |
| template<typename NewScalarType > | |
| ei_cast_return_type< Transform, Transform< NewScalarType, Dim > >::type | cast () const |
| template<typename RotationMatrixType , typename ScalingMatrixType > | |
| void | computeRotationScaling (RotationMatrixType *rotation, ScalingMatrixType *scaling) const |
| template<typename ScalingMatrixType , typename RotationMatrixType > | |
| void | computeScalingRotation (ScalingMatrixType *scaling, RotationMatrixType *rotation) const |
| Scalar * | data () |
| const Scalar * | data () const |
| EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE (_Scalar, _Dim==Dynamic?Dynamic:(_Dim+1)*(_Dim+1)) enum | |
| template<typename PositionDerived , typename OrientationType , typename ScaleDerived > | |
| Transform & | fromPositionOrientationScale (const MatrixBase< PositionDerived > &position, const OrientationType &orientation, const MatrixBase< ScaleDerived > &scale) |
| const MatrixType | inverse (TransformTraits traits=Affine) const |
| bool | isApprox (const Transform &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const |
| LinearPart | linear () |
| const LinearPart | linear () const |
| MatrixType & | matrix () |
| const MatrixType & | matrix () const |
| Scalar & | operator() (int row, int col) |
| Scalar | operator() (int row, int col) const |
| template<typename Derived > | |
| Transform | operator* (const RotationBase< Derived, Dim > &r) const |
| Transform | operator* (const ScalingType &s) const |
| Transform | operator* (const TranslationType &t) const |
| const Transform | operator* (const Transform &other) const |
| template<typename OtherDerived > | |
| const ei_transform_product_impl < OtherDerived, _Dim, _Dim+1 > ::ResultType | operator* (const MatrixBase< OtherDerived > &other) const |
| template<typename Derived > | |
| Transform & | operator*= (const RotationBase< Derived, Dim > &r) |
| Transform & | operator*= (const ScalingType &s) |
| Transform & | operator*= (const TranslationType &t) |
| template<typename Derived > | |
| Transform & | operator= (const RotationBase< Derived, Dim > &r) |
| Transform & | operator= (const ScalingType &t) |
| Transform & | operator= (const TranslationType &t) |
| template<typename OtherDerived > | |
| Transform & | operator= (const MatrixBase< OtherDerived > &other) |
| Transform & | operator= (const Transform &other) |
| template<typename RotationType > | |
| Transform & | prerotate (const RotationType &rotation) |
| Transform & | prescale (Scalar s) |
| template<typename OtherDerived > | |
| Transform & | prescale (const MatrixBase< OtherDerived > &other) |
| Transform & | preshear (Scalar sx, Scalar sy) |
| template<typename OtherDerived > | |
| Transform & | pretranslate (const MatrixBase< OtherDerived > &other) |
| template<typename RotationType > | |
| Transform & | rotate (const RotationType &rotation) |
| LinearMatrixType | rotation () const |
| Transform & | scale (Scalar s) |
| template<typename OtherDerived > | |
| Transform & | scale (const MatrixBase< OtherDerived > &other) |
| void | setIdentity () |
| Transform & | shear (Scalar sx, Scalar sy) |
| template<typename OtherScalarType > | |
| Transform (const Transform< OtherScalarType, Dim > &other) | |
| template<typename OtherDerived > | |
| Transform (const MatrixBase< OtherDerived > &other) | |
| template<typename Derived > | |
| Transform (const RotationBase< Derived, Dim > &r) | |
| Transform (const ScalingType &s) | |
| Transform (const TranslationType &t) | |
| Transform (const Transform &other) | |
| Transform () | |
| template<typename OtherDerived > | |
| Transform & | translate (const MatrixBase< OtherDerived > &other) |
| TranslationPart | translation () |
| const TranslationPart | translation () const |
Static Public Member Functions | |
| static const MatrixType::IdentityReturnType | Identity () |
Protected Attributes | |
| MatrixType | m_matrix |
Friends | |
| Transform | operator* (const LinearMatrixType &mat, const Transform &t) |
| template<typename OtherDerived > | |
| const ProductReturnType < OtherDerived, MatrixType > ::Type | operator* (const MatrixBase< OtherDerived > &a, const Transform &b) |
Represents an homogeneous transformation in a N dimensional space.
| _Scalar | the scalar type, i.e., the type of the coefficients | |
| _Dim | the dimension of the space |
The homography is internally represented and stored as a (Dim+1)^2 matrix which is available through the matrix() method.
Conversion methods from/to Qt's QMatrix and QTransform are available if the preprocessor token EIGEN_QT_SUPPORT is defined.
Definition at line 64 of file Transform.h.
| typedef Matrix<Scalar,Dim,Dim> Transform< _Scalar, _Dim >::LinearMatrixType |
type of the matrix used to represent the linear part of the transformation
Definition at line 77 of file Transform.h.
| typedef Block<MatrixType,Dim,Dim> Transform< _Scalar, _Dim >::LinearPart |
type of read/write reference to the linear part of the transformation
Definition at line 79 of file Transform.h.
| typedef Matrix<Scalar,HDim,HDim> Transform< _Scalar, _Dim >::MatrixType |
type of the matrix used to represent the transformation
Definition at line 75 of file Transform.h.
the scalar type of the coefficients
Definition at line 71 of file Transform.h.
| typedef Scaling<Scalar,Dim> Transform< _Scalar, _Dim >::ScalingType |
corresponding scaling transformation type
Definition at line 87 of file Transform.h.
| typedef Block<MatrixType,Dim,1> Transform< _Scalar, _Dim >::TranslationPart |
type of a read/write reference to the translation part of the rotation
Definition at line 83 of file Transform.h.
| typedef Translation<Scalar,Dim> Transform< _Scalar, _Dim >::TranslationType |
corresponding translation type
Definition at line 85 of file Transform.h.
| typedef Matrix<Scalar,Dim,1> Transform< _Scalar, _Dim >::VectorType |
type of a vector
Definition at line 81 of file Transform.h.
Default constructor without initialization of the coefficients.
Definition at line 96 of file Transform.h.
| Transform< _Scalar, _Dim >::Transform | ( | const Transform< _Scalar, _Dim > & | other | ) | [inline] |
Definition at line 98 of file Transform.h.
| Transform< _Scalar, _Dim >::Transform | ( | const TranslationType & | t | ) | [inline, explicit] |
Definition at line 103 of file Transform.h.
| Transform< _Scalar, _Dim >::Transform | ( | const ScalingType & | s | ) | [inline, explicit] |
Definition at line 104 of file Transform.h.
| Transform< _Scalar, _Dim >::Transform | ( | const RotationBase< Derived, Dim > & | r | ) | [inline, explicit] |
Definition at line 106 of file Transform.h.
| Transform< _Scalar, _Dim >::Transform | ( | const MatrixBase< OtherDerived > & | other | ) | [inline, explicit] |
Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix.
Definition at line 133 of file Transform.h.
| Transform< _Scalar, _Dim >::Transform | ( | const Transform< OtherScalarType, Dim > & | other | ) | [inline, explicit] |
Copy constructor with scalar type conversion
Definition at line 280 of file Transform.h.
| ei_cast_return_type<Transform,Transform<NewScalarType,Dim> >::type Transform< _Scalar, _Dim >::cast | ( | ) | const [inline] |
*this with scalar type casted to NewScalarType Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.
Definition at line 275 of file Transform.h.
| void Transform< Scalar, Dim >::computeRotationScaling | ( | RotationMatrixType * | rotation, | |
| ScalingMatrixType * | scaling | |||
| ) | const [inline] |
decomposes the linear part of the transformation as a product rotation x scaling, the scaling being not necessarily positive.
If either pointer is zero, the corresponding computation is skipped.
Definition at line 636 of file Transform.h.
| void Transform< Scalar, Dim >::computeScalingRotation | ( | ScalingMatrixType * | scaling, | |
| RotationMatrixType * | rotation | |||
| ) | const [inline] |
decomposes the linear part of the transformation as a product rotation x scaling, the scaling being not necessarily positive.
If either pointer is zero, the corresponding computation is skipped.
Definition at line 654 of file Transform.h.
Definition at line 267 of file Transform.h.
| const Scalar* Transform< _Scalar, _Dim >::data | ( | ) | const [inline] |
Definition at line 265 of file Transform.h.
| Transform< _Scalar, _Dim >::EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE | ( | _Scalar | , | |
| _Dim | = =Dynamic ? Dynamic : (_Dim+1)*(_Dim+1) | |||
| ) | [inline] |
< space dimension in which the transformation holds
< size of a respective homogeneous vector
Definition at line 67 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::fromPositionOrientationScale | ( | const MatrixBase< PositionDerived > & | position, | |
| const OrientationType & | orientation, | |||
| const MatrixBase< ScaleDerived > & | scale | |||
| ) | [inline] |
Convenient method to set *this from a position, orientation and scale of a 3D object.
Definition at line 665 of file Transform.h.
| static const MatrixType::IdentityReturnType Transform< _Scalar, _Dim >::Identity | ( | ) | [inline, static] |
Definition at line 201 of file Transform.h.
| const Transform< Scalar, Dim >::MatrixType Transform< Scalar, Dim >::inverse | ( | TransformTraits | traits = Affine |
) | const [inline] |
*this.| traits | allows to optimize the inversion process when the transformion is known to be not a general transformation. The possible values are:
|
Definition at line 697 of file Transform.h.
| bool Transform< _Scalar, _Dim >::isApprox | ( | const Transform< _Scalar, _Dim > & | other, | |
| typename NumTraits< Scalar >::Real | prec = precision<Scalar>() | |||
| ) | const [inline] |
true if *this is approximately equal to other, within the precision determined by prec.Definition at line 287 of file Transform.h.
| LinearPart Transform< _Scalar, _Dim >::linear | ( | ) | [inline] |
Definition at line 167 of file Transform.h.
| const LinearPart Transform< _Scalar, _Dim >::linear | ( | ) | const [inline] |
Definition at line 165 of file Transform.h.
| MatrixType& Transform< _Scalar, _Dim >::matrix | ( | ) | [inline] |
Definition at line 162 of file Transform.h.
| const MatrixType& Transform< _Scalar, _Dim >::matrix | ( | ) | const [inline] |
Definition at line 160 of file Transform.h.
| Scalar& Transform< _Scalar, _Dim >::operator() | ( | int | row, | |
| int | col | |||
| ) | [inline] |
shortcut for m_matrix(row,col);
Definition at line 157 of file Transform.h.
| Scalar Transform< _Scalar, _Dim >::operator() | ( | int | row, | |
| int | col | |||
| ) | const [inline] |
shortcut for m_matrix(row,col);
Definition at line 154 of file Transform.h.
| Transform< Scalar, Dim > Transform< Scalar, Dim >::operator* | ( | const RotationBase< Derived, Dim > & | r | ) | const [inline] |
Definition at line 595 of file Transform.h.
| Transform< Scalar, Dim > Transform< Scalar, Dim >::operator* | ( | const ScalingType & | s | ) | const [inline] |
Definition at line 575 of file Transform.h.
| Transform< Scalar, Dim > Transform< Scalar, Dim >::operator* | ( | const TranslationType & | t | ) | const [inline] |
Definition at line 558 of file Transform.h.
| const Transform Transform< _Scalar, _Dim >::operator* | ( | const Transform< _Scalar, _Dim > & | other | ) | const [inline] |
Contatenates two transformations
Definition at line 196 of file Transform.h.
| const ei_transform_product_impl<OtherDerived,_Dim,_Dim+1>::ResultType Transform< _Scalar, _Dim >::operator* | ( | const MatrixBase< OtherDerived > & | other | ) | const [inline] |
*this and a matrix expression other The right hand side other might be either:
Definition at line 184 of file Transform.h.
| Transform& Transform< _Scalar, _Dim >::operator*= | ( | const RotationBase< Derived, Dim > & | r | ) | [inline] |
Definition at line 248 of file Transform.h.
| Transform& Transform< _Scalar, _Dim >::operator*= | ( | const ScalingType & | s | ) | [inline] |
Definition at line 235 of file Transform.h.
| Transform& Transform< _Scalar, _Dim >::operator*= | ( | const TranslationType & | t | ) | [inline] |
Definition at line 231 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::operator= | ( | const RotationBase< Derived, Dim > & | r | ) | [inline] |
Definition at line 584 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::operator= | ( | const ScalingType & | t | ) | [inline] |
Definition at line 566 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::operator= | ( | const TranslationType & | t | ) | [inline] |
Definition at line 548 of file Transform.h.
| Transform& Transform< _Scalar, _Dim >::operator= | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
Set *this from a (Dim+1)^2 matrix.
Definition at line 140 of file Transform.h.
| Transform& Transform< _Scalar, _Dim >::operator= | ( | const Transform< _Scalar, _Dim > & | other | ) | [inline] |
Definition at line 108 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::prerotate | ( | const RotationType & | rotation | ) | [inline] |
Applies on the left the rotation represented by the rotation rotation to *this and returns a reference to *this.
See rotate() for further details.
Definition at line 507 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::prescale | ( | Scalar | s | ) | [inline] |
Applies on the left a uniform scale of a factor c to *this and returns a reference to *this.
Definition at line 437 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::prescale | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
Applies on the left the non uniform scale transformation represented by the vector other to *this and returns a reference to *this.
Definition at line 425 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::preshear | ( | Scalar | sx, | |
| Scalar | sy | |||
| ) | [inline] |
Applies on the left the shear transformation represented by the vector other to *this and returns a reference to *this.
Definition at line 536 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::pretranslate | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
Applies on the left the translation matrix represented by the vector other to *this and returns a reference to *this.
Definition at line 464 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::rotate | ( | const RotationType & | rotation | ) | [inline] |
Applies on the right the rotation represented by the rotation rotation to *this and returns a reference to *this.
The template parameter RotationType is the type of the rotation which must be known by ei_toRotationMatrix<>.
Natively supported types includes:
This mechanism is easily extendable to support user types such as Euler angles, or a pair of Quaternion for 4D rotations.
Definition at line 491 of file Transform.h.
| Transform< Scalar, Dim >::LinearMatrixType Transform< Scalar, Dim >::rotation | ( | ) | const [inline] |
Definition at line 615 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::scale | ( | Scalar | s | ) | [inline] |
Applies on the right a uniform scale of a factor c to *this and returns a reference to *this.
Definition at line 412 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::scale | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
Applies on the right the non uniform scale transformation represented by the vector other to *this and returns a reference to *this.
Definition at line 400 of file Transform.h.
| void Transform< _Scalar, _Dim >::setIdentity | ( | ) | [inline] |
Definition at line 200 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::shear | ( | Scalar | sx, | |
| Scalar | sy | |||
| ) | [inline] |
Applies on the right the shear transformation represented by the vector other to *this and returns a reference to *this.
Definition at line 521 of file Transform.h.
| Transform< Scalar, Dim > & Transform< Scalar, Dim >::translate | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
Applies on the right the translation matrix represented by the vector other to *this and returns a reference to *this.
Definition at line 450 of file Transform.h.
| TranslationPart Transform< _Scalar, _Dim >::translation | ( | ) | [inline] |
Definition at line 172 of file Transform.h.
| const TranslationPart Transform< _Scalar, _Dim >::translation | ( | ) | const [inline] |
Definition at line 170 of file Transform.h.
| Transform operator* | ( | const LinearMatrixType & | mat, | |
| const Transform< _Scalar, _Dim > & | t | |||
| ) | [friend] |
Definition at line 237 of file Transform.h.
| const ProductReturnType<OtherDerived,MatrixType>::Type operator* | ( | const MatrixBase< OtherDerived > & | a, | |
| const Transform< _Scalar, _Dim > & | b | |||
| ) | [friend] |
Definition at line 191 of file Transform.h.
MatrixType Transform< _Scalar, _Dim >::m_matrix [protected] |
Definition at line 91 of file Transform.h.