10 #ifndef EIGEN_ANGLEAXIS_H
11 #define EIGEN_ANGLEAXIS_H
44 template<
typename Scalar_>
struct traits<AngleAxis<Scalar_> >
46 typedef Scalar_ Scalar;
50 template<
typename Scalar_>
57 using Base::operator*;
80 template<
typename Derived>
86 template<
typename QuatDerived>
89 template<
typename Derived>
121 template<
class QuatDerived>
123 template<
typename Derived>
126 template<
typename Derived>
135 template<
typename NewScalarType>
136 EIGEN_DEVICE_FUNC inline typename internal::cast_return_type<AngleAxis,AngleAxis<NewScalarType> >::type
cast()
const
137 {
return typename internal::cast_return_type<AngleAxis,AngleAxis<NewScalarType> >::type(*
this); }
140 template<
typename OtherScalarType>
143 m_axis = other.
axis().template cast<Scalar>();
170 template<
typename Scalar>
171 template<
typename QuatDerived>
178 n = q.
vec().stableNorm();
185 m_axis = q.
vec() /
n;
197 template<
typename Scalar>
198 template<
typename Derived>
209 template<
typename Scalar>
210 template<
typename Derived>
218 template<
typename Scalar>
230 tmp = cos1_axis.x() * m_axis.y();
231 res.coeffRef(0,1) = tmp - sin_axis.z();
232 res.coeffRef(1,0) = tmp + sin_axis.z();
234 tmp = cos1_axis.x() * m_axis.z();
235 res.coeffRef(0,2) = tmp + sin_axis.y();
236 res.coeffRef(2,0) = tmp - sin_axis.y();
238 tmp = cos1_axis.y() * m_axis.z();
239 res.coeffRef(1,2) = tmp - sin_axis.x();
240 res.coeffRef(2,1) = tmp + sin_axis.x();
242 res.diagonal() = (cos1_axis.cwiseProduct(m_axis)).
array() +
c;
const CwiseBinaryOp< atan2< Scalar >, const Derived, const OtherDerived > atan2(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
#define EIGEN_USING_STD(FUNC)
#define EIGEN_DEVICE_FUNC
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.
const Vector3 & axis() const
AngleAxis(const AngleAxis< OtherScalarType > &other)
QuaternionType operator*(const AngleAxis &other) const
AngleAxis(const QuaternionBase< QuatDerived > &q)
AngleAxis & operator=(const MatrixBase< Derived > &m)
AngleAxis & fromRotationMatrix(const MatrixBase< Derived > &m)
AngleAxis(const Scalar &angle, const MatrixBase< Derived > &axis)
AngleAxis(const MatrixBase< Derived > &m)
Quaternion< Scalar > QuaternionType
AngleAxis inverse() const
Matrix< Scalar, 3, 1 > Vector3
internal::cast_return_type< AngleAxis, AngleAxis< NewScalarType > >::type cast() const
bool isApprox(const AngleAxis &other, const typename NumTraits< Scalar >::Real &prec=NumTraits< Scalar >::dummy_precision()) const
Matrix3 toRotationMatrix(void) const
RotationBase< AngleAxis< Scalar_ >, 3 > Base
Matrix< Scalar, 3, 3 > Matrix3
static const AngleAxis Identity()
AngleAxis & operator=(const QuaternionBase< QuatDerived > &q)
Base class for all dense matrices, vectors, and expressions.
static const BasisReturnType UnitX()
The matrix class, also used for vectors and row-vectors.
Base class for quaternion expressions.
CoeffReturnType w() const
const VectorBlock< const Coefficients, 3 > vec() const
The quaternion class used to represent 3D orientations and rotations.
Common base class for compact rotation representations.
AngleAxis< float > AngleAxisf
AngleAxis< double > AngleAxisd
bool isApprox(const Scalar &x, const Scalar &y, const typename NumTraits< Scalar >::Real &precision=NumTraits< Scalar >::dummy_precision())
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_cos_op< typename Derived::Scalar >, const Derived > cos(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_abs_op< typename Derived::Scalar >, const Derived > abs(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sin_op< typename Derived::Scalar >, const Derived > sin(const Eigen::ArrayBase< Derived > &x)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.