10 #ifndef EIGEN_ANGLEAXIS_H
11 #define EIGEN_ANGLEAXIS_H
48 template<
typename _Scalar>
55 using Base::operator*;
78 template<
typename Derived>
84 template<
typename QuatDerived>
87 template<
typename Derived>
119 template<
class QuatDerived>
121 template<
typename Derived>
124 template<
typename Derived>
133 template<
typename NewScalarType>
138 template<
typename OtherScalarType>
141 m_axis = other.
axis().template cast<Scalar>();
168 template<
typename Scalar>
169 template<
typename QuatDerived>
176 n = q.
vec().stableNorm();
183 m_axis = q.
vec() / n;
195 template<
typename Scalar>
196 template<
typename Derived>
207 template<
typename Scalar>
208 template<
typename Derived>
216 template<
typename Scalar>
228 tmp = cos1_axis.x() * m_axis.y();
229 res.
coeffRef(0,1) = tmp - sin_axis.z();
230 res.
coeffRef(1,0) = tmp + sin_axis.z();
232 tmp = cos1_axis.x() * m_axis.z();
233 res.
coeffRef(0,2) = tmp + sin_axis.y();
234 res.
coeffRef(2,0) = tmp - sin_axis.y();
236 tmp = cos1_axis.y() * m_axis.z();
237 res.
coeffRef(1,2) = tmp - sin_axis.x();
238 res.
coeffRef(2,1) = tmp + sin_axis.x();
240 res.diagonal() = (cos1_axis.cwiseProduct(m_axis)).array() + c;
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const AbsReturnType abs() const
Definition: ArrayCwiseUnaryOps.h:52
EIGEN_DEVICE_FUNC const CosReturnType cos() const
Definition: ArrayCwiseUnaryOps.h:237
EIGEN_DEVICE_FUNC const SinReturnType sin() const
Definition: ArrayCwiseUnaryOps.h:255
#define EIGEN_USING_STD(FUNC)
Definition: Macros.h:1185
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.
Definition: AngleAxis.h:50
Matrix< Scalar, 3, 1 > Vector3
Definition: AngleAxis.h:61
Vector3 m_axis
Definition: AngleAxis.h:66
EIGEN_DEVICE_FUNC bool isApprox(const AngleAxis &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: AngleAxis.h:151
EIGEN_DEVICE_FUNC AngleAxis()
Definition: AngleAxis.h:72
EIGEN_DEVICE_FUNC internal::cast_return_type< AngleAxis, AngleAxis< NewScalarType > >::type cast() const
Definition: AngleAxis.h:134
RotationBase< AngleAxis< _Scalar >, 3 > Base
Definition: AngleAxis.h:51
EIGEN_DEVICE_FUNC AngleAxis(const AngleAxis< OtherScalarType > &other)
Definition: AngleAxis.h:139
EIGEN_DEVICE_FUNC Matrix3 toRotationMatrix(void) const
Definition: AngleAxis.h:218
EIGEN_DEVICE_FUNC AngleAxis(const QuaternionBase< QuatDerived > &q)
Definition: AngleAxis.h:85
EIGEN_DEVICE_FUNC Scalar angle() const
Definition: AngleAxis.h:91
static EIGEN_DEVICE_FUNC const AngleAxis Identity()
Definition: AngleAxis.h:145
EIGEN_DEVICE_FUNC AngleAxis inverse() const
Definition: AngleAxis.h:116
@ Dim
Definition: AngleAxis.h:57
EIGEN_DEVICE_FUNC AngleAxis(const Scalar &angle, const MatrixBase< Derived > &axis)
Definition: AngleAxis.h:80
EIGEN_DEVICE_FUNC AngleAxis & fromRotationMatrix(const MatrixBase< Derived > &m)
EIGEN_DEVICE_FUNC QuaternionType operator*(const AngleAxis &other) const
Definition: AngleAxis.h:104
Matrix< Scalar, 3, 3 > Matrix3
Definition: AngleAxis.h:60
_Scalar Scalar
Definition: AngleAxis.h:59
EIGEN_DEVICE_FUNC const Vector3 & axis() const
Definition: AngleAxis.h:96
Quaternion< Scalar > QuaternionType
Definition: AngleAxis.h:62
EIGEN_DEVICE_FUNC AngleAxis(const MatrixBase< Derived > &m)
Definition: AngleAxis.h:88
Scalar m_angle
Definition: AngleAxis.h:67
EIGEN_DEVICE_FUNC AngleAxis & operator=(const QuaternionBase< QuatDerived > &q)
EIGEN_DEVICE_FUNC Vector3 & axis()
Definition: AngleAxis.h:101
EIGEN_DEVICE_FUNC AngleAxis & operator=(const MatrixBase< Derived > &m)
EIGEN_DEVICE_FUNC Scalar & angle()
Definition: AngleAxis.h:93
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index rowId, Index colId)
Definition: PlainObjectBase.h:175
Base class for quaternion expressions.
Definition: Quaternion.h:36
EIGEN_DEVICE_FUNC CoeffReturnType w() const
Definition: Quaternion.h:72
EIGEN_DEVICE_FUNC const VectorBlock< const Coefficients, 3 > vec() const
Definition: Quaternion.h:84
The quaternion class used to represent 3D orientations and rotations.
Definition: Quaternion.h:274
Common base class for compact rotation representations.
Definition: RotationBase.h:30
AngleAxis< float > AngleAxisf
Definition: AngleAxis.h:157
AngleAxis< double > AngleAxisd
Definition: AngleAxis.h:160
EIGEN_DEVICE_FUNC bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
Definition: MathFunctions.h:1947
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
type
The type the bitset is encoded with.
Definition: bitset.hpp:44
Definition: document.h:416
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1181
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:233
Definition: XprHelper.h:510
_Scalar Scalar
Definition: AngleAxis.h:44
Definition: ForwardDeclarations.h:17