Represents an homogeneous transformation in a N dimensional space. More...
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 |
const Scalar * | data () const |
Scalar * | data () |
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 |
const LinearPart | linear () const |
LinearPart | linear () |
const MatrixType & | matrix () const |
MatrixType & | matrix () |
Scalar | operator() (int row, int col) const |
Scalar & | operator() (int row, int col) |
template<typename OtherDerived > | |
const ei_transform_product_impl < OtherDerived, _Dim, _Dim+1 > ::ResultType | operator* (const MatrixBase< OtherDerived > &other) const |
const Transform | operator* (const Transform &other) const |
Transform | operator* (const TranslationType &t) const |
Transform | operator* (const ScalingType &s) const |
template<typename Derived > | |
Transform | operator* (const RotationBase< Derived, Dim > &r) const |
Transform & | operator*= (const TranslationType &t) |
Transform & | operator*= (const ScalingType &s) |
template<typename Derived > | |
Transform & | operator*= (const RotationBase< Derived, Dim > &r) |
Transform & | operator= (const Transform &other) |
template<typename OtherDerived > | |
Transform & | operator= (const MatrixBase< OtherDerived > &other) |
Transform & | operator= (const QMatrix &other) |
Transform & | operator= (const QTransform &other) |
Transform & | operator= (const TranslationType &t) |
Transform & | operator= (const ScalingType &t) |
template<typename Derived > | |
Transform & | operator= (const RotationBase< Derived, Dim > &r) |
template<typename RotationType > | |
Transform & | prerotate (const RotationType &rotation) |
template<typename OtherDerived > | |
Transform & | prescale (const MatrixBase< OtherDerived > &other) |
Transform & | prescale (Scalar s) |
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 |
template<typename OtherDerived > | |
Transform & | scale (const MatrixBase< OtherDerived > &other) |
Transform & | scale (Scalar s) |
void | setIdentity () |
Transform & | shear (Scalar sx, Scalar sy) |
QMatrix | toQMatrix (void) const |
QTransform | toQTransform (void) const |
Transform () | |
Transform (const Transform &other) | |
Transform (const TranslationType &t) | |
Transform (const ScalingType &s) | |
template<typename Derived > | |
Transform (const RotationBase< Derived, Dim > &r) | |
template<typename OtherDerived > | |
Transform (const MatrixBase< OtherDerived > &other) | |
Transform (const QMatrix &other) | |
Transform (const QTransform &other) | |
template<typename OtherScalarType > | |
Transform (const Transform< OtherScalarType, Dim > &other) | |
template<typename OtherDerived > | |
Transform & | translate (const MatrixBase< OtherDerived > &other) |
const TranslationPart | translation () const |
TranslationPart | translation () |
Static Public Member Functions | |
static const MatrixType::IdentityReturnType | Identity () |
Protected Attributes | |
MatrixType | m_matrix |
Friends | |
template<typename OtherDerived > | |
const ProductReturnType < OtherDerived, MatrixType > ::Type | operator* (const MatrixBase< OtherDerived > &a, const Transform &b) |
Transform | operator* (const LinearMatrixType &mat, const Transform &t) |
Represents an homogeneous transformation in a N dimensional space.
This is defined in the Geometry module.
_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.
typedef Matrix<Scalar,Dim,Dim> LinearMatrixType |
type of the matrix used to represent the linear part of the transformation
typedef Block<MatrixType,Dim,Dim> LinearPart |
type of read/write reference to the linear part of the transformation
typedef Matrix<Scalar,HDim,HDim> MatrixType |
type of the matrix used to represent the transformation
typedef _Scalar Scalar |
the scalar type of the coefficients
typedef Scaling<Scalar,Dim> ScalingType |
corresponding scaling transformation type
typedef Block<MatrixType,Dim,1> TranslationPart |
type of a read/write reference to the translation part of the rotation
typedef Translation<Scalar,Dim> TranslationType |
corresponding translation type
typedef Matrix<Scalar,Dim,1> VectorType |
type of a vector
|
inline |
Default constructor without initialization of the coefficients.
|
inlineexplicit |
Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix.
|
inline |
Initialises *this
from a QMatrix assuming the dimension is 2.
This function is available only if the token EIGEN_QT_SUPPORT is defined.
|
inline |
Initialises *this
from a QTransform assuming the dimension is 2.
This function is available only if the token EIGEN_QT_SUPPORT is defined.
Copy constructor with scalar type conversion
*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
.
void computeRotationScaling | ( | RotationMatrixType * | rotation, |
ScalingMatrixType * | scaling | ||
) | const |
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.
This is defined in the SVD module.
void computeScalingRotation | ( | ScalingMatrixType * | scaling, |
RotationMatrixType * | rotation | ||
) | const |
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.
This is defined in the SVD module.
|
inline |
|
inline |
|
inline |
< space dimension in which the transformation holds
< size of a respective homogeneous vector
Transform< Scalar, Dim > & fromPositionOrientationScale | ( | const MatrixBase< PositionDerived > & | position, |
const OrientationType & | orientation, | ||
const MatrixBase< ScaleDerived > & | scale | ||
) |
Convenient method to set *this
from a position, orientation and scale of a 3D object.
|
inline |
*this
.traits | allows to optimize the inversion process when the transformion is known to be not a general transformation. The possible values are:
|
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
shortcut for m_matrix(row,col);
|
inline |
shortcut for m_matrix(row,col);
|
inline |
*this
and a matrix expression other The right hand side other might be either:
Contatenates two transformations
|
inline |
Set *this
from a (Dim+1)^2 matrix.
Set *this
from a QMatrix assuming the dimension is 2.
This function is available only if the token EIGEN_QT_SUPPORT is defined.
Set *this
from a QTransform assuming the dimension is 2.
This function is available only if the token EIGEN_QT_SUPPORT is defined.
|
inline |
Applies on the left the non uniform scale transformation represented by the vector other to *this
and returns a reference to *this
.
Applies on the left a uniform scale of a factor c to *this
and returns a reference to *this
.
Applies on the left the shear transformation represented by the vector other to *this
and returns a reference to *this
.
|
inline |
Applies on the left the translation matrix represented by the vector other to *this
and returns a reference to *this
.
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.
Transform< Scalar, Dim >::LinearMatrixType rotation | ( | ) | const |
This is defined in the SVD module.
|
inline |
Applies on the right the non uniform scale transformation represented by the vector other to *this
and returns a reference to *this
.
Applies on the right a uniform scale of a factor c to *this
and returns a reference to *this
.
|
inline |
Applies on the right the shear transformation represented by the vector other to *this
and returns a reference to *this
.
|
inline |
*this
assuming the dimension is 2.*this
is not affineThis function is available only if the token EIGEN_QT_SUPPORT is defined.
|
inline |
*this
assuming the dimension is 2.This function is available only if the token EIGEN_QT_SUPPORT is defined.
|
inline |
Applies on the right the translation matrix represented by the vector other to *this
and returns a reference to *this
.
|
inline |
|
inline |
|
friend |