Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Protected Attributes
Eigen::UniformScaling< _Scalar > Class Template Reference

Public Types

typedef _Scalar Scalar
 

Public Member Functions

 UniformScaling ()
 
 UniformScaling (const Scalar &s)
 
const Scalarfactor () const
 
Scalarfactor ()
 
UniformScaling operator* (const UniformScaling &other) const
 
template<int Dim>
Transform< Scalar, Dim, Affine > operator* (const Translation< Scalar, Dim > &t) const
 
template<int Dim, int Mode, int Options>
Transform< Scalar, Dim,(int(Mode)==int(Isometry)?Affine:Mode)> operator* (const Transform< Scalar, Dim, Mode, Options > &t) const
 
template<typename Derived >
internal::plain_matrix_type< Derived >::type operator* (const MatrixBase< Derived > &other) const
 
template<typename Derived , int Dim>
Matrix< Scalar, Dim, Dim > operator* (const RotationBase< Derived, Dim > &r) const
 
UniformScaling inverse () const
 
template<typename NewScalarType >
UniformScaling< NewScalarType > cast () const
 
template<typename OtherScalarType >
 UniformScaling (const UniformScaling< OtherScalarType > &other)
 
bool isApprox (const UniformScaling &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
 

Protected Attributes

Scalar m_factor
 

Detailed Description

template<typename _Scalar>
class Eigen::UniformScaling< _Scalar >

Definition at line 33 of file Scaling.h.

Member Typedef Documentation

template<typename _Scalar>
typedef _Scalar Eigen::UniformScaling< _Scalar >::Scalar

the scalar type of the coefficients

Definition at line 37 of file Scaling.h.

Constructor & Destructor Documentation

template<typename _Scalar>
Eigen::UniformScaling< _Scalar >::UniformScaling ( )
inline

Default constructor without initialization.

Definition at line 46 of file Scaling.h.

46 {}
template<typename _Scalar>
Eigen::UniformScaling< _Scalar >::UniformScaling ( const Scalar s)
inlineexplicit

Constructs and initialize a uniform scaling transformation

Definition at line 48 of file Scaling.h.

48 : m_factor(s) {}
template<typename _Scalar>
template<typename OtherScalarType >
Eigen::UniformScaling< _Scalar >::UniformScaling ( const UniformScaling< OtherScalarType > &  other)
inlineexplicit

Copy constructor with scalar type conversion

Definition at line 95 of file Scaling.h.

96  { m_factor = Scalar(other.factor()); }

Member Function Documentation

template<typename _Scalar>
template<typename NewScalarType >
UniformScaling<NewScalarType> Eigen::UniformScaling< _Scalar >::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.

Definition at line 90 of file Scaling.h.

91  { return UniformScaling<NewScalarType>(NewScalarType(m_factor)); }
template<typename _Scalar>
UniformScaling Eigen::UniformScaling< _Scalar >::inverse ( void  ) const
inline
Returns
the inverse scaling

Definition at line 81 of file Scaling.h.

82  { return UniformScaling(Scalar(1)/m_factor); }
template<typename _Scalar>
bool Eigen::UniformScaling< _Scalar >::isApprox ( const UniformScaling< _Scalar > &  other,
const typename NumTraits< Scalar >::Real &  prec = NumTraits<Scalar>::dummy_precision() 
) const
inline
Returns
true if *this is approximately equal to other, within the precision determined by prec.
See also
MatrixBase::isApprox()

Definition at line 102 of file Scaling.h.

103  { return internal::isApprox(m_factor, other.factor(), prec); }
template<typename _Scalar>
UniformScaling Eigen::UniformScaling< _Scalar >::operator* ( const UniformScaling< _Scalar > &  other) const
inline

Concatenates two uniform scaling

Definition at line 54 of file Scaling.h.

55  { return UniformScaling(m_factor * other.factor()); }
template<typename Scalar >
template<int Dim>
Transform< Scalar, Dim, Affine > Eigen::UniformScaling< Scalar >::operator* ( const Translation< Scalar, Dim > &  t) const
inline

Concatenates a uniform scaling and a translation

Definition at line 154 of file Scaling.h.

155 {
156  Transform<Scalar,Dim,Affine> res;
157  res.matrix().setZero();
158  res.linear().diagonal().fill(factor());
159  res.translation() = factor() * t.vector();
160  res(Dim,Dim) = Scalar(1);
161  return res;
162 }
template<typename _Scalar>
template<int Dim, int Mode, int Options>
Transform<Scalar,Dim,(int(Mode)==int(Isometry)?Affine:Mode)> Eigen::UniformScaling< _Scalar >::operator* ( const Transform< Scalar, Dim, Mode, Options > &  t) const
inline

Concatenates a uniform scaling and an affine transformation

Definition at line 63 of file Scaling.h.

63  :Mode)> operator* (const Transform<Scalar,Dim, Mode, Options>& t) const
64  {
65  Transform<Scalar,Dim,(int(Mode)==int(Isometry)?Affine:Mode)> res = t;
66  res.prescale(factor());
67  return res;
68 }
template<typename _Scalar>
template<typename Derived >
internal::plain_matrix_type<Derived>::type Eigen::UniformScaling< _Scalar >::operator* ( const MatrixBase< Derived > &  other) const
inline

Concatenates a uniform scaling and a linear transformation matrix

Definition at line 73 of file Scaling.h.

74  { return other * m_factor; }

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