Scaling< _Scalar, _Dim > Class Template Reference
[Geometry_Module]

Represents a possibly non uniform scaling transformation. More...

#include <Scaling.h>

List of all members.

Public Types

enum  { Dim = _Dim }
typedef Matrix< Scalar, Dim, Dim > LinearMatrixType
typedef _Scalar Scalar
typedef Transform< Scalar, Dim > TransformType
typedef Translation< Scalar, Dim > TranslationType
typedef Matrix< Scalar, Dim, 1 > VectorType

Public Member Functions

template<typename NewScalarType >
ei_cast_return_type< Scaling,
Scaling< NewScalarType, Dim >
>::type 
cast () const
VectorTypecoeffs ()
const VectorTypecoeffs () const
Scaling inverse () const
bool isApprox (const Scaling &other, typename NumTraits< Scalar >::Real prec=precision< Scalar >()) const
VectorType operator* (const VectorType &other) const
template<typename Derived >
LinearMatrixType operator* (const RotationBase< Derived, Dim > &r) const
LinearMatrixType operator* (const LinearMatrixType &other) const
TransformType operator* (const TransformType &t) const
TransformType operator* (const TranslationType &t) const
Scaling operator* (const Scaling &other) const
Scalingoperator= (const Scaling &other)
template<typename OtherScalarType >
 Scaling (const Scaling< OtherScalarType, Dim > &other)
 Scaling (const VectorType &coeffs)
 Scaling (const Scalar &sx, const Scalar &sy, const Scalar &sz)
 Scaling (const Scalar &sx, const Scalar &sy)
 Scaling (const Scalar &s)
 Scaling ()

Protected Attributes

VectorType m_coeffs

Friends

LinearMatrixType operator* (const LinearMatrixType &other, const Scaling &s)

Detailed Description

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

Represents a possibly non uniform scaling transformation.

Parameters:
_Scalar the scalar type, i.e., the type of the coefficients.
_Dim the 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

Definition at line 43 of file Scaling.h.


Member Typedef Documentation

template<typename _Scalar, int _Dim>
typedef Matrix<Scalar,Dim,Dim> Scaling< _Scalar, _Dim >::LinearMatrixType

corresponding linear transformation matrix type

Definition at line 54 of file Scaling.h.

template<typename _Scalar, int _Dim>
typedef _Scalar Scaling< _Scalar, _Dim >::Scalar

the scalar type of the coefficients

Definition at line 50 of file Scaling.h.

template<typename _Scalar, int _Dim>
typedef Transform<Scalar,Dim> Scaling< _Scalar, _Dim >::TransformType

corresponding affine transformation type

Definition at line 58 of file Scaling.h.

template<typename _Scalar, int _Dim>
typedef Translation<Scalar,Dim> Scaling< _Scalar, _Dim >::TranslationType

corresponding translation type

Definition at line 56 of file Scaling.h.

template<typename _Scalar, int _Dim>
typedef Matrix<Scalar,Dim,1> Scaling< _Scalar, _Dim >::VectorType

corresponding vector type

Definition at line 52 of file Scaling.h.


Member Enumeration Documentation

template<typename _Scalar, int _Dim>
anonymous enum

dimension of the space

Enumerator:
Dim 

Definition at line 48 of file Scaling.h.


Constructor & Destructor Documentation

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

Default constructor without initialization.

Definition at line 67 of file Scaling.h.

template<typename _Scalar, int _Dim>
Scaling< _Scalar, _Dim >::Scaling ( const Scalar s  )  [inline, explicit]

Constructs and initialize a uniform scaling transformation

Definition at line 69 of file Scaling.h.

template<typename _Scalar, int _Dim>
Scaling< _Scalar, _Dim >::Scaling ( const Scalar sx,
const Scalar sy 
) [inline]

2D only

Definition at line 71 of file Scaling.h.

template<typename _Scalar, int _Dim>
Scaling< _Scalar, _Dim >::Scaling ( const Scalar sx,
const Scalar sy,
const Scalar sz 
) [inline]

3D only

Definition at line 78 of file Scaling.h.

template<typename _Scalar, int _Dim>
Scaling< _Scalar, _Dim >::Scaling ( const VectorType coeffs  )  [inline, explicit]

Constructs and initialize the scaling transformation from a vector of scaling coefficients

Definition at line 86 of file Scaling.h.

template<typename _Scalar, int _Dim>
template<typename OtherScalarType >
Scaling< _Scalar, _Dim >::Scaling ( const Scaling< OtherScalarType, Dim > &  other  )  [inline, explicit]

Copy constructor with scalar type conversion

Definition at line 140 of file Scaling.h.


Member Function Documentation

template<typename _Scalar, int _Dim>
template<typename NewScalarType >
ei_cast_return_type<Scaling,Scaling<NewScalarType,Dim> >::type 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.

Definition at line 135 of file Scaling.h.

template<typename _Scalar, int _Dim>
VectorType& Scaling< _Scalar, _Dim >::coeffs (  )  [inline]

Definition at line 89 of file Scaling.h.

template<typename _Scalar, int _Dim>
const VectorType& Scaling< _Scalar, _Dim >::coeffs (  )  const [inline]

Definition at line 88 of file Scaling.h.

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

Definition at line 120 of file Scaling.h.

template<typename _Scalar, int _Dim>
bool 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()

Definition at line 147 of file Scaling.h.

template<typename _Scalar, int _Dim>
VectorType Scaling< _Scalar, _Dim >::operator* ( const VectorType other  )  const [inline]

Applies scaling to vector

Definition at line 116 of file Scaling.h.

template<typename _Scalar, int _Dim>
template<typename Derived >
LinearMatrixType Scaling< _Scalar, _Dim >::operator* ( const RotationBase< Derived, Dim > &  r  )  const [inline]

Definition at line 112 of file Scaling.h.

template<typename _Scalar, int _Dim>
LinearMatrixType Scaling< _Scalar, _Dim >::operator* ( const LinearMatrixType other  )  const [inline]

Concatenates a scaling and a linear transformation matrix

Definition at line 103 of file Scaling.h.

template<typename Scalar , int Dim>
Scaling< Scalar, Dim >::TransformType Scaling< Scalar, Dim >::operator* ( const TransformType t  )  const [inline]

Concatenates a scaling and an affine transformation

Definition at line 174 of file Scaling.h.

template<typename Scalar , int Dim>
Scaling< Scalar, Dim >::TransformType Scaling< Scalar, Dim >::operator* ( const TranslationType t  )  const [inline]

Concatenates a scaling and a translation

Definition at line 162 of file Scaling.h.

template<typename _Scalar, int _Dim>
Scaling Scaling< _Scalar, _Dim >::operator* ( const Scaling< _Scalar, _Dim > &  other  )  const [inline]

Concatenates two scaling

Definition at line 92 of file Scaling.h.

template<typename _Scalar, int _Dim>
Scaling& Scaling< _Scalar, _Dim >::operator= ( const Scaling< _Scalar, _Dim > &  other  )  [inline]

Definition at line 123 of file Scaling.h.


Friends And Related Function Documentation

template<typename _Scalar, int _Dim>
LinearMatrixType operator* ( const LinearMatrixType other,
const Scaling< _Scalar, _Dim > &  s 
) [friend]

Concatenates a linear transformation matrix and a scaling

Definition at line 108 of file Scaling.h.


Member Data Documentation

template<typename _Scalar, int _Dim>
VectorType Scaling< _Scalar, _Dim >::m_coeffs [protected]

Definition at line 62 of file Scaling.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:22:20 2013