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) |
Transform & | operator= (const QTransform &other) |
Transform & | operator= (const QMatrix &other) |
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) |
QMatrix | toQMatrix (void) const |
QTransform | toQTransform (void) const |
template<typename OtherScalarType > | |
Transform (const Transform< OtherScalarType, Dim > &other) | |
Transform (const QTransform &other) | |
Transform (const QMatrix &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) |
This is defined in the Geometry module.
#include <Eigen/Geometry>
_Scalar | the scalar type, i.e., the type of the coefficients | |
_Dim | the dimension of the space |
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
Transform | ( | ) | [inline] |
Default constructor without initialization of the coefficients.
Transform | ( | const MatrixBase< OtherDerived > & | other | ) | [inline, explicit] |
Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix.
Transform | ( | const QMatrix & | other | ) | [inline] |
Initialises *this
from a QMatrix assuming the dimension is 2.
This function is available only if the token EIGEN_QT_SUPPORT is defined.
Transform | ( | const QTransform< _Scalar, _Dim > & | other | ) | [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 *this
then this function smartly returns a const reference to *this
.
void 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.
#include <Eigen/SVD>
void 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.
#include <Eigen/SVD>
Scalar* data | ( | ) | [inline] |
const Scalar* data | ( | ) | const [inline] |
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
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.
const Transform< Scalar, Dim >::MatrixType 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:
|
bool 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.LinearPart linear | ( | ) | [inline] |
const LinearPart linear | ( | ) | const [inline] |
MatrixType& matrix | ( | ) | [inline] |
const MatrixType& matrix | ( | ) | const [inline] |
Scalar& operator() | ( | int | row, | |
int | col | |||
) | [inline] |
shortcut for m_matrix(row,col);
Scalar operator() | ( | int | row, | |
int | col | |||
) | const [inline] |
shortcut for m_matrix(row,col);
Contatenates two transformations
const ei_transform_product_impl<OtherDerived,_Dim,_Dim+1>::ResultType operator* | ( | const MatrixBase< OtherDerived > & | other | ) | const [inline] |
*this
and a matrix expression other
Set *this
from a QTransform assuming the dimension is 2.
This function is available only if the token EIGEN_QT_SUPPORT is defined.
Set *this
from a QMatrix assuming the dimension is 2.
This function is available only if the token EIGEN_QT_SUPPORT is defined.
Transform& operator= | ( | const MatrixBase< OtherDerived > & | other | ) | [inline] |
Set *this
from a (Dim+1)^2 matrix.
Applies on the left a uniform scale of a factor c to *this
and returns a reference to *this
.
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
.
Applies on the left the shear transformation represented by the vector other to *this
and returns a reference to *this
.
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
.
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 [inline] |
#include <Eigen/SVD>
Applies on the right a uniform scale of a factor c to *this
and returns a reference to *this
.
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
.
void setIdentity | ( | ) | [inline] |
Applies on the right the shear transformation represented by the vector other to *this
and returns a reference to *this
.
QMatrix toQMatrix | ( | void | ) | const [inline] |
*this
assuming the dimension is 2.*this
is not affineQTransform toQTransform | ( | void | ) | const [inline] |
*this
assuming the dimension is 2.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
.
TranslationPart translation | ( | ) | [inline] |
const TranslationPart translation | ( | ) | const [inline] |
const ProductReturnType<OtherDerived,MatrixType>::Type operator* | ( | const MatrixBase< OtherDerived > & | a, | |
const Transform< _Scalar, _Dim > & | b | |||
) | [friend] |