OSVR-Core
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
Eigen::Scaling< _Scalar, _Dim > Class Template Reference

More...

#include <Scaling.h>

Public Types

enum  { Dim = _Dim }
 dimension of the space
 
typedef _Scalar Scalar
 the scalar type of the coefficients
 
typedef Matrix< Scalar, Dim, 1 > VectorType
 corresponding vector type
 
typedef Matrix< Scalar, Dim, Dim > LinearMatrixType
 corresponding linear transformation matrix type
 
typedef Translation< Scalar, Dim > TranslationType
 corresponding translation type
 
typedef Transform< Scalar, Dim > TransformType
 corresponding affine transformation type
 

Public Member Functions

 Scaling ()
 Default constructor without initialization. More...
 
 Scaling (const Scalar &s)
 Constructs and initialize a uniform scaling transformation.
 
 Scaling (const Scalar &sx, const Scalar &sy)
 2D only
 
 Scaling (const Scalar &sx, const Scalar &sy, const Scalar &sz)
 3D only
 
 Scaling (const VectorType &coeffs)
 Constructs and initialize the scaling transformation from a vector of scaling coefficients.
 
const VectorTypecoeffs () const
 
VectorTypecoeffs ()
 
Scaling operator* (const Scaling &other) const
 Concatenates two scaling.
 
TransformType operator* (const TranslationType &t) const
 Concatenates a scaling and a translation.
 
TransformType operator* (const TransformType &t) const
 Concatenates a scaling and an affine transformation.
 
LinearMatrixType operator* (const LinearMatrixType &other) const
 Concatenates a scaling and a linear transformation matrix.
 
template<typename Derived >
LinearMatrixType operator* (const RotationBase< Derived, Dim > &r) const
 
VectorType operator* (const VectorType &other) const
 Applies scaling to vector.
 
Scaling inverse () const
 
Scalingoperator= (const Scaling &other)
 
template<typename NewScalarType >
internal::cast_return_type< Scaling, Scaling< NewScalarType, Dim > >::type cast () const
 
template<typename OtherScalarType >
 Scaling (const Scaling< OtherScalarType, Dim > &other)
 Copy constructor with scalar type conversion.
 
bool isApprox (const Scaling &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
 

Protected Attributes

VectorType m_coeffs
 

Friends

LinearMatrixType operator* (const LinearMatrixType &other, const Scaling &s)
 Concatenates a linear transformation matrix and a scaling.
 

Detailed Description

template<typename _Scalar, int _Dim>
class Eigen::Scaling< _Scalar, _Dim >

Represents a possibly non uniform scaling transformation

Parameters
_Scalarthe scalar type, i.e., the type of the coefficients.
_Dimthe dimension of the space, can be a compile time value or Dynamic
Note
This class is not aimed to be used to store a scaling transformation, but rather to make easier the constructions and updates of Transform objects.
See also
class Translation, class Transform

Represents a generic uniform scaling transformation

Parameters
_Scalarthe scalar type, i.e., the type of the coefficients.

This class represent a uniform scaling transformation. It is the return type of Scaling(Scalar), and most of the time this is the only way it is used. In particular, this class is not aimed to be used to store a scaling transformation, but rather to make easier the constructions and updates of Transform objects.

To represent an axis aligned scaling, use the DiagonalMatrix class.

See also
Scaling(), class DiagonalMatrix, MatrixBase::asDiagonal(), class Translation, class Transform

Constructor & Destructor Documentation

§ Scaling()

template<typename _Scalar, int _Dim>
Eigen::Scaling< _Scalar, _Dim >::Scaling ( )
inline

Default constructor without initialization.

Member Function Documentation

§ cast()

template<typename _Scalar, int _Dim>
template<typename NewScalarType >
internal::cast_return_type<Scaling,Scaling<NewScalarType,Dim> >::type Eigen::Scaling< _Scalar, _Dim >::cast ( ) const
inline
Returns
*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.

§ inverse()

template<typename _Scalar, int _Dim>
Scaling Eigen::Scaling< _Scalar, _Dim >::inverse ( void  ) const
inline
Returns
the inverse scaling

§ isApprox()

template<typename _Scalar, int _Dim>
bool Eigen::Scaling< _Scalar, _Dim >::isApprox ( const Scaling< _Scalar, _Dim > &  other,
typename NumTraits< Scalar >::Real  prec = precision<Scalar>() 
) const
inline
Returns
true if *this is approximately equal to other, within the precision determined by prec.
See also
MatrixBase::isApprox()

The documentation for this class was generated from the following file: