10 #ifndef EIGEN_EULERANGLESCLASS_H
11 #define EIGEN_EULERANGLESCLASS_H
101 template <
typename Scalar_,
class _System>
122 return System::IsAlphaOpposite ? -u : u;
128 return System::IsBetaOpposite ? -u : u;
134 return System::IsGammaOpposite ? -u : u;
163 template<
typename Derived>
177 template<
typename Derived>
239 template<
class Derived>
243 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
245 internal::eulerangles_assign_impl<System, Derived>::run(*
this, other.
derived());
256 template<
typename Derived>
293 template <
typename NewScalarType>
297 e.angles() =
angles().template cast<NewScalarType>();
302 #define EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(AXES, SCALAR_TYPE, SCALAR_POSTFIX) \
304 typedef EulerAngles<SCALAR_TYPE, EulerSystem##AXES> EulerAngles##AXES##SCALAR_POSTFIX;
306 #define EIGEN_EULER_ANGLES_TYPEDEFS(SCALAR_TYPE, SCALAR_POSTFIX) \
307 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XYZ, SCALAR_TYPE, SCALAR_POSTFIX) \
308 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XYX, SCALAR_TYPE, SCALAR_POSTFIX) \
309 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XZY, SCALAR_TYPE, SCALAR_POSTFIX) \
310 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XZX, SCALAR_TYPE, SCALAR_POSTFIX) \
312 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YZX, SCALAR_TYPE, SCALAR_POSTFIX) \
313 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YZY, SCALAR_TYPE, SCALAR_POSTFIX) \
314 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YXZ, SCALAR_TYPE, SCALAR_POSTFIX) \
315 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YXY, SCALAR_TYPE, SCALAR_POSTFIX) \
317 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZXY, SCALAR_TYPE, SCALAR_POSTFIX) \
318 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZXZ, SCALAR_TYPE, SCALAR_POSTFIX) \
319 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZYX, SCALAR_TYPE, SCALAR_POSTFIX) \
320 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZYZ, SCALAR_TYPE, SCALAR_POSTFIX)
327 template<
typename Scalar_,
class _System>
330 typedef Scalar_ Scalar;
334 template<
class System,
class Other>
335 struct eulerangles_assign_impl<System,Other,3,3>
337 typedef typename Other::Scalar Scalar;
340 System::CalcEulerAngles(
e,
m);
345 template<
class System,
class Other>
346 struct eulerangles_assign_impl<System,Other,3,1>
348 typedef typename Other::Scalar Scalar;
Array< double, 1, 3 > e(1./3., 0.5, 2.)
#define EIGEN_EULER_ANGLES_TYPEDEFS(SCALAR_TYPE, SCALAR_POSTFIX)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
#define EIGEN_STATIC_ASSERT(X, MSG)
Represents a rotation in a 3 dimensional space as three Euler angles.
EulerAngles & operator=(const RotationBase< Derived, 3 > &rot)
EulerAngles & operator=(const MatrixBase< Derived > &other)
static Vector3 GammaAxisVector()
static Vector3 AlphaAxisVector()
EulerAngles< NewScalarType, System > cast() const
Quaternion< Scalar > QuaternionType
EulerAngles(const Scalar &alpha, const Scalar &beta, const Scalar &gamma)
const Vector3 & angles() const
EulerAngles(const Scalar *data)
AngleAxis< Scalar > AngleAxisType
Matrix3 toRotationMatrix() const
friend std::ostream & operator<<(std::ostream &s, const EulerAngles< Scalar, System > &eulerAngles)
NumTraits< Scalar >::Real RealScalar
static Vector3 BetaAxisVector()
EulerAngles inverse() const
EulerAngles(const MatrixBase< Derived > &other)
EulerAngles operator-() const
Matrix< Scalar, 3, 3 > Matrix3
EulerAngles(const RotationBase< Derived, 3 > &rot)
bool isApprox(const EulerAngles &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
RotationBase< EulerAngles< Scalar_, _System >, 3 > Base
Matrix< Scalar, 3, 1 > Vector3
static const BasisReturnType Unit(Index i)
Matrix3 toRotationMatrix() const
RotationMatrixType toRotationMatrix() const
EIGEN_DEPRECATED Matrix< Scalar, 3, 1 > eulerAngles(Index a0, Index a1, Index a2) const
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend