Go to the documentation of this file.
10 #ifndef EIGEN_EULERANGLESCLASS_H// TODO: Fix previous "EIGEN_EULERANGLES_H" definition?
11 #define EIGEN_EULERANGLESCLASS_H
99 template <
typename _Scalar,
class _System>
119 const Vector3& u = Vector3::Unit(System::AlphaAxisAbs - 1);
120 return System::IsAlphaOpposite ? -u : u;
125 const Vector3& u = Vector3::Unit(System::BetaAxisAbs - 1);
126 return System::IsBetaOpposite ? -u : u;
131 const Vector3& u = Vector3::Unit(System::GammaAxisAbs - 1);
132 return System::IsGammaOpposite ? -u : u;
161 template<
typename Derived>
175 template<
typename Derived>
237 template<
class Derived>
241 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
254 template<
typename Derived>
256 System::CalcEulerAngles(*
this,
rot.toRotationMatrix());
266 {
return angles().isApprox(
other.angles(), prec); }
286 s << eulerAngles.
angles().transpose();
291 template <
typename NewScalarType>
295 e.angles() =
angles().template cast<NewScalarType>();
300 #define EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(AXES, SCALAR_TYPE, SCALAR_POSTFIX) \
302 typedef EulerAngles<SCALAR_TYPE, EulerSystem##AXES> EulerAngles##AXES##SCALAR_POSTFIX;
304 #define EIGEN_EULER_ANGLES_TYPEDEFS(SCALAR_TYPE, SCALAR_POSTFIX) \
305 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XYZ, SCALAR_TYPE, SCALAR_POSTFIX) \
306 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XYX, SCALAR_TYPE, SCALAR_POSTFIX) \
307 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XZY, SCALAR_TYPE, SCALAR_POSTFIX) \
308 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(XZX, SCALAR_TYPE, SCALAR_POSTFIX) \
310 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YZX, SCALAR_TYPE, SCALAR_POSTFIX) \
311 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YZY, SCALAR_TYPE, SCALAR_POSTFIX) \
312 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YXZ, SCALAR_TYPE, SCALAR_POSTFIX) \
313 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(YXY, SCALAR_TYPE, SCALAR_POSTFIX) \
315 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZXY, SCALAR_TYPE, SCALAR_POSTFIX) \
316 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZXZ, SCALAR_TYPE, SCALAR_POSTFIX) \
317 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZYX, SCALAR_TYPE, SCALAR_POSTFIX) \
318 EIGEN_EULER_ANGLES_SINGLE_TYPEDEF(ZYZ, SCALAR_TYPE, SCALAR_POSTFIX)
325 template<
typename _Scalar,
class _System>
332 template<
class System,
class Other>
338 System::CalcEulerAngles(
e,
m);
343 template<
class System,
class Other>
355 #endif // EIGEN_EULERANGLESCLASS_H
Represents a rotation in a 3 dimensional space as three Euler angles.
Matrix< Scalar, 3, 3 > Matrix3
Namespace containing all symbols from the Eigen library.
Matrix3 toRotationMatrix() const
EulerAngles inverse() const
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const double d[K][N]
NumTraits< Scalar >::Real RealScalar
Represents a 3D rotation as a rotation angle around an arbitrary 3D axis.
Quaternion< Scalar > QuaternionType
static Vector3 AlphaAxisVector()
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EulerAngles< NewScalarType, System > cast() const
EulerAngles(const MatrixBase< Derived > &other)
EulerAngles & operator=(const RotationBase< Derived, 3 > &rot)
int EIGEN_BLAS_FUNC() rot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)
EulerAngles(const Scalar &alpha, const Scalar &beta, const Scalar &gamma)
RotationBase< EulerAngles< _Scalar, _System >, 3 > Base
static Vector3 GammaAxisVector()
EulerAngles(const Scalar *data)
Matrix< Scalar, 3, 1 > Vector3
friend std::ostream & operator<<(std::ostream &s, const EulerAngles< Scalar, System > &eulerAngles)
Common base class for compact rotation representations.
const Vector3 & angles() const
static Vector3 BetaAxisVector()
EulerAngles operator-() const
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
bool isApprox(const EulerAngles &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
The quaternion class used to represent 3D orientations and rotations.
#define EIGEN_EULER_ANGLES_TYPEDEFS(SCALAR_TYPE, SCALAR_POSTFIX)
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EulerAngles & operator=(const MatrixBase< Derived > &other)
AngleAxis< Scalar > AngleAxisType
static void run(EulerAngles< Scalar, System > &e, const Other &m)
EulerAngles(const RotationBase< Derived, 3 > &rot)
The matrix class, also used for vectors and row-vectors.
Base class for all dense matrices, vectors, and expressions.
static void run(EulerAngles< Scalar, System > &e, const Other &vec)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:31