10#ifndef EIGEN_ANGLEAXIS_H
11#define EIGEN_ANGLEAXIS_H
44 typedef _Scalar Scalar;
48template<
typename _Scalar>
55 using Base::operator*;
78 template<
typename Derived>
85 template<
typename Derived>
117 template<
class QuatDerived>
119 template<
typename Derived>
122 template<
typename Derived>
131 template<
typename NewScalarType>
136 template<
typename OtherScalarType>
140 m_angle =
Scalar(other.angle());
150 {
return m_axis.isApprox(other.m_axis,
prec) && internal::isApprox(m_angle,other.m_angle,
prec); }
165template<
typename Scalar>
166template<
typename QuatDerived>
172 n =
q.vec().stableNorm();
176 m_axis =
q.vec() / n;
188template<
typename Scalar>
189template<
typename Derived>
200template<
typename Scalar>
201template<
typename Derived>
209template<
typename Scalar>
222 res.coeffRef(0,1) = tmp -
sin_axis.z();
223 res.coeffRef(1,0) = tmp +
sin_axis.z();
226 res.coeffRef(0,2) = tmp +
sin_axis.y();
227 res.coeffRef(2,0) = tmp -
sin_axis.y();
230 res.coeffRef(1,2) = tmp -
sin_axis.x();
231 res.coeffRef(2,1) = tmp +
sin_axis.x();
233 res.diagonal() = (
cos1_axis.cwiseProduct(m_axis)).array() + c;
\geometry_module
Definition AngleAxis.h:50
AngleAxis()
Default constructor without initialization.
Definition AngleAxis.h:72
Scalar & angle()
Definition AngleAxis.h:91
Vector3 & axis()
Definition AngleAxis.h:99
AngleAxis(const MatrixBase< Derived > &m)
Constructs and initialize the angle-axis rotation from a 3x3 rotation matrix.
Definition AngleAxis.h:86
Scalar angle() const
Definition AngleAxis.h:89
AngleAxis(const AngleAxis< OtherScalarType > &other)
Copy constructor with scalar type conversion.
Definition AngleAxis.h:137
AngleAxis(const Scalar &angle, const MatrixBase< Derived > &axis)
Constructs and initialize the angle-axis rotation from an angle in radian and an axis which must be n...
Definition AngleAxis.h:79
internal::cast_return_type< AngleAxis, AngleAxis< NewScalarType > >::type cast() const
Definition AngleAxis.h:132
bool isApprox(const AngleAxis &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
Definition AngleAxis.h:149
const Vector3 & axis() const
Definition AngleAxis.h:94
_Scalar Scalar
the scalar type of the coefficients
Definition AngleAxis.h:59
friend QuaternionType operator*(const QuaternionType &a, const AngleAxis &b)
Concatenates two rotations.
Definition AngleAxis.h:110
Matrix3 toRotationMatrix(void) const
Constructs and.
Definition AngleAxis.h:211
AngleAxis inverse() const
Definition AngleAxis.h:114
AngleAxis(const QuaternionBase< QuatDerived > &q)
Constructs and initialize the angle-axis rotation from a quaternion q.
Definition AngleAxis.h:83
\geometry_module
Definition Quaternion.h:228
Common base class for compact rotation representations.
Definition RotationBase.h:30
Pseudo expression representing a solving operation.
Definition Solve.h:63
Holds information about the various numeric (i.e.
Definition NumTraits.h:108
Definition XprHelper.h:500
Definition ForwardDeclarations.h:17