10 #ifndef EIGEN_ROTATIONBASE_H 11 #define EIGEN_ROTATIONBASE_H 17 template<
typename RotationDerived,
typename MatrixType,
bool IsVector=MatrixType::IsVectorAtCompileTime>
28 template<
typename Derived,
int _Dim>
41 EIGEN_DEVICE_FUNC
inline const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
42 EIGEN_DEVICE_FUNC
inline Derived& derived() {
return *
static_cast<Derived*
>(
this); }
45 EIGEN_DEVICE_FUNC
inline RotationMatrixType
toRotationMatrix()
const {
return derived().toRotationMatrix(); }
50 EIGEN_DEVICE_FUNC
inline RotationMatrixType
matrix()
const {
return derived().toRotationMatrix(); }
53 EIGEN_DEVICE_FUNC
inline Derived
inverse()
const {
return derived().inverse(); }
61 {
return toRotationMatrix() * s.factor(); }
69 template<
typename OtherDerived>
75 template<
typename OtherDerived>
friend 77 {
return l.
derived() * r.toRotationMatrix(); }
83 res.
linear().applyOnTheLeft(l);
88 template<
int Mode,
int Options>
90 {
return toRotationMatrix() * t; }
92 template<
typename OtherVectorType>
93 EIGEN_DEVICE_FUNC
inline VectorType _transformVector(
const OtherVectorType& v)
const 94 {
return toRotationMatrix() * v; }
100 template<
typename RotationDerived,
typename MatrixType>
103 enum { Dim = RotationDerived::Dim };
105 EIGEN_DEVICE_FUNC
static inline ReturnType run(
const RotationDerived& r,
const MatrixType& m)
106 {
return r.toRotationMatrix() * m; }
109 template<
typename RotationDerived,
typename Scalar,
int Dim,
int MaxDim>
121 template<
typename RotationDerived,
typename OtherVectorType>
124 enum { Dim = RotationDerived::Dim };
126 EIGEN_DEVICE_FUNC
static EIGEN_STRONG_INLINE ReturnType run(
const RotationDerived& r,
const OtherVectorType& v)
128 return r._transformVector(v);
138 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Storage,
int _MaxRows,
int _MaxCols>
139 template<
typename OtherDerived>
143 EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(
Matrix,
int(OtherDerived::Dim),
int(OtherDerived::Dim))
151 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Storage,
int _MaxRows,
int _MaxCols>
152 template<
typename OtherDerived>
157 EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(
Matrix,
int(OtherDerived::Dim),
int(OtherDerived::Dim))
181 template<
typename Scalar,
int Dim>
184 EIGEN_STATIC_ASSERT(Dim==2,YOU_MADE_A_PROGRAMMING_MISTAKE)
188 template<
typename Scalar,
int Dim,
typename OtherDerived>
194 template<
typename Scalar,
int Dim,
typename OtherDerived>
197 EIGEN_STATIC_ASSERT(OtherDerived::RowsAtCompileTime==Dim && OtherDerived::ColsAtCompileTime==Dim,
198 YOU_MADE_A_PROGRAMMING_MISTAKE)
206 #endif // EIGEN_ROTATIONBASE_H EIGEN_DEVICE_FUNC Transform< Scalar, Dim, Isometry > operator*(const Translation< Scalar, Dim > &t) const
Definition: RotationBase.h:56
Definition: RotationBase.h:18
Matrix< Scalar, Dim, Dim > RotationMatrixType
corresponding linear transformation matrix type
Definition: RotationBase.h:37
Represents a diagonal matrix with its storage.
Definition: DiagonalMatrix.h:116
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
EIGEN_DEVICE_FUNC Derived inverse() const
Definition: RotationBase.h:53
EIGEN_DEVICE_FUNC Transform< Scalar, Dim, Mode > operator*(const Transform< Scalar, Dim, Mode, Options > &t) const
Definition: RotationBase.h:89
Common base class for all classes T such that MatrixBase has an operator=(T) and a constructor Matrix...
Definition: EigenBase.h:28
Definition: ForwardDeclarations.h:271
friend EIGEN_DEVICE_FUNC RotationMatrixType operator*(const EigenBase< OtherDerived > &l, const Derived &r)
Definition: RotationBase.h:76
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix()
Default constructor.
Definition: Matrix.h:259
Common base class for compact rotation representations.
Definition: ForwardDeclarations.h:266
EIGEN_DEVICE_FUNC RotationMatrixType toRotationMatrix() const
Definition: RotationBase.h:45
internal::traits< Derived >::Scalar Scalar
the scalar type of the coefficients
Definition: RotationBase.h:34
Definition: BandTriangularSolver.h:13
Definition: ForwardDeclarations.h:269
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType operator*(const EigenBase< OtherDerived > &e) const
Definition: RotationBase.h:71
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Matrix & operator=(const Matrix &other)
Assigns matrices to each other.
Definition: Matrix.h:206
EIGEN_DEVICE_FUNC RotationMatrixType operator*(const UniformScaling< Scalar > &s) const
Definition: RotationBase.h:60
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178
EIGEN_DEVICE_FUNC friend Transform< Scalar, Dim, Affine > operator*(const DiagonalMatrix< Scalar, Dim > &l, const Derived &r)
Definition: RotationBase.h:80
EIGEN_DEVICE_FUNC Derived & derived()
Definition: EigenBase.h:44
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: ForwardDeclarations.h:17
EIGEN_DEVICE_FUNC RotationMatrixType matrix() const
Definition: RotationBase.h:50