avsEigenMRP¶
- 
namespace Eigen¶
- Typedefs - 
template<typename _Scalar, int_Options>
 classMap<const MRP<_Scalar>, _Options> : public Eigen::MRPBase<Map<const MRP<_Scalar>, _Options>>¶
- #include <avsEigenMRP.h>MRP expression mapping a constant memory buffer. This is a specialization of class Map for MRP. This class allows to view a 3 scalar memory buffer as an Eigen’s MRP object.- Template Parameters
- _Scalar: the type of the MRP coefficients
- _Options: see class Map
 
 Public Functions - 
EIGEN_STRONG_INLINE Map(const Scalar *coeffs)¶
- Constructs a Mapped MRP object from the pointer coeffs - The pointer coeffs must reference the three coefficients of MRP in the following order: - *coeffs == {x, y, z} - If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. 
 - 
const Coefficients &coeffs() const¶
 Protected Attributes - 
const Coefficients m_coeffs¶
 
 - 
template<typename _Scalar, int_Options>
 classMap<MRP<_Scalar>, _Options> : public Eigen::MRPBase<Map<MRP<_Scalar>, _Options>>¶
- #include <avsEigenMRP.h>Expression of a MRP from a memory buffer. This is a specialization of class Map for MRP. This class allows to view a 3 scalar memory buffer as an Eigen’s MRP object.- Template Parameters
- _Scalar: the type of the MRP coefficients
- _Options: see class Map
 
 Public Functions - 
EIGEN_STRONG_INLINE Map(Scalar *coeffs)¶
- Constructs a Mapped MRP object from the pointer coeffs - The pointer coeffs must reference the three coefficients of MRP in the following order: - *coeffs == {x, y, z} - If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned. 
 - 
Coefficients &coeffs()¶
 - 
const Coefficients &coeffs() const¶
 Protected Attributes - 
Coefficients m_coeffs¶
 
 - 
template<typename _Scalar, int_Options>
 classMRP¶
- #include <avsEigenMRP.h>The MRP class used to represent 3D orientations and rotations. \geometry_module This class represents a MRP \( (x,y,z) \) that is a convenient representation of orientations and rotations of objects in three dimensions. Compared to other representations like Euler angles or 3x3 matrices, MRPs offer the following advantages:- compact storage (3 scalars) 
- efficient to compose (28 flops), 
 The following two typedefs are provided for convenience: - MRPffor- float
- MRPdfor- double
 - Warning
- Operations interpreting the MRP as rotation have undefined behavior if the MRP is not normalized. 
- See
- class AngleAxis, class Transform 
- Template Parameters
- _Scalar: the scalar type, i.e., the type of the coefficients
- _Options: controls the memory alignment of the coefficients. Can be # AutoAlign or # DontAlign. Default is AutoAlign.
 
 Public Types Public Functions - 
MRP(const Scalar &x, const Scalar &y, const Scalar &z)¶
- Constructs and initializes the MRP \( (x,y,z) \) from its four coefficients x, y and z. 
 - 
MRP(const AngleAxisType &aa)¶
- Constructs and initializes a MRP from the angle-axis aa 
 - 
template<typename Derived>MRP(const MatrixBase<Derived> &other)¶
- Constructs and initializes a MRP from either: - a rotation matrix expression, 
- a 3D vector expression representing MRP coefficients. 
 
 - 
Coefficients &coeffs()¶
 - 
const Coefficients &coeffs() const¶
 - 
template<typename Derived1, typenameDerived2>
 MRP<Scalar, Options>FromTwoVectors(const MatrixBase<Derived1> &a, const MatrixBase<Derived2> &b)¶
- Returns a MRP representing a rotation between the two arbitrary vectors a and b. In other words, the built rotation represent a rotation sending the line of direction a to the line of direction b, both lines passing through the origin. - Note that the two input vectors do not have to be normalized, and do not need to have the same norm.- Return
- resulting MRP 
 
 - 
template<class OtherDerived> EIGEN_STRONG_INLINE Derived & operator*= (const MRPBase< OtherDerived > &q)
- See
- operator*(MRP) 
 
 Public Static Functions Protected Attributes - 
Coefficients m_coeffs¶
 Protected Static Functions - 
EIGEN_STRONG_INLINE void _check_template_params ()
 
 - 
template<class Derived>
 classMRPBase: public RotationBase<Derived, 3>¶
- #include <avsEigenMRP.h>Base class for MRP expressions. \geometry_module - See
- class MRP 
- Template Parameters
- Derived: derived type (CRTP)
 
 Public Types Public Functions - 
const VectorBlock<const Coefficients, 3> vec() const¶
- Return
- a read-only vector expression of the imaginary part (x,y,z) 
 
 - 
VectorBlock<Coefficients, 3> vec()¶
- Return
- a vector expression of the imaginary part (x,y,z) 
 
 - 
const internal::traits<Derived>::Coefficients &coeffs() const¶
- Return
- a read-only vector expression of the coefficients (x,y,z) 
 
 - 
internal::traits<Derived>::Coefficients &coeffs()¶
- Return
- a vector expression of the coefficients (x,y,z) 
 
 - 
EIGEN_STRONG_INLINE MRPBase< Derived > & operator= (const MRPBase< Derived > &other)
 - 
template<class OtherDerived> EIGEN_STRONG_INLINE Derived & operator= (const MRPBase< OtherDerived > &other)
 - 
Derived &operator=(const AngleAxisType &aa)¶
- Set - *thisfrom an angle-axis aa and returns a reference to- *this
 - 
template<class OtherDerived>
 Derived &operator=(const MatrixBase<OtherDerived> &m)¶
 - 
MRPBase &setIdentity()¶
- See
- MRPBase::Identity(), MatrixBase::setIdentity() 
 
 - 
Scalar squaredNorm() const¶
- Return
- the squared norm of the MRP’s coefficients 
- See
- MRPBase::norm(), MatrixBase::squaredNorm() 
 
 - 
Scalar norm() const¶
- Return
- the norm of the MRP’s coefficients 
- See
- MRPBase::squaredNorm(), MatrixBase::norm() 
 
 - 
void normalize()¶
- Normalizes the MRP - *this- See
- normalized(), MatrixBase::normalize() 
 
 - 
MRP<Scalar> normalized() const¶
- Return
- a normalized copy of - *this
- See
- normalize(), MatrixBase::normalized() 
 
 - 
template<class OtherDerived>
 Scalardot(const MRPBase<OtherDerived> &other) const¶
- Return
- the dot product of - *thisand other Geometrically speaking, the dot product of two unit MRPs corresponds to the cosine of half the angle between the two rotations.
- See
- angularDistance() 
 
 - 
template<class OtherDerived>
 ScalarangularDistance(const MRPBase<OtherDerived> &other) const¶
 - 
Matrix3 toRotationMatrix() const¶
- Convert the MRP sigma_B/N to a 3x3 rotation matrix [NB].- Return
- an equivalent 3x3 rotation matrix 
 
 - 
template<typename Derived1, typenameDerived2>
 Derived &setFromTwoVectors(const MatrixBase<Derived1> &a, const MatrixBase<Derived2> &b)¶
- Sets - *thisto be a MRP representing a rotation between the two arbitrary vectors a and b. In other words, the built rotation represent a rotation sending the line of direction a to the line of direction b, both lines passing through the origin.- Return
- the MRP which transform a into b through a rotation 
 - Note that the two input vectors do not have to be normalized, and do not need to have the same norm.- Return
- a reference to - *this.
 
 - 
template<class OtherDerived> EIGEN_STRONG_INLINE MRP< Scalar > operator* (const MRPBase< OtherDerived > &q) const
 - 
template<class OtherDerived> EIGEN_STRONG_INLINE Derived & operator*= (const MRPBase< OtherDerived > &q)
- See
- operator*(MRP) 
 
 - 
template<class OtherDerived> EIGEN_STRONG_INLINE Derived & operator+= (const MRPBase< OtherDerived > &q)
- See
- operator*(MRP) 
 
 - 
template<class OtherDerived> EIGEN_STRONG_INLINE Derived & operator-= (const MRPBase< OtherDerived > &q)
- See
- operator*(MRP) 
 
 - 
MRP<Scalar> shadow() const¶
 - 
Matrix3 Bmat() const¶
- d(sigmda_B/N) = 1/4 [B(sigma_B/N)] omega_BN_B 
 - 
MRP<Scalar> inverse() const¶
 - 
template<class OtherDerived>
 boolisApprox(const MRPBase<OtherDerived> &other, const RealScalar &prec = NumTraits<Scalar>::dummy_precision()) const¶
- Return
- trueif- *thisis approximately equal to other, within the precision determined by prec.
- See
- MatrixBase::isApprox() 
 
 - 
EIGEN_STRONG_INLINE Vector3 _transformVector (const Vector3 &v) const
- return the result vector of v through the rotation - Rotation of a vector by a MRP. - Remark
- If the MRP is used to rotate several points (>1) then it is much more efficient to first convert it to a 3x3 Matrix. Comparison of the operation cost for n transformations: - MRP2: 30n 
- Via a Matrix3: 24 + 15n 
 
 
 - 
template<typename NewScalarType>
 internal::cast_return_type<Derived, MRP<NewScalarType>>::typecast() const¶
- Note that if NewScalarType is equal to the current scalar type of- *thisthen this function smartly returns a const reference to- *this.- Return
- *thiswith scalar type casted to NewScalarType
 
 - 
template<class OtherDerived> EIGEN_STRONG_INLINE MRP< typename internal::traits< Derived >::Scalar > operator* (const MRPBase< OtherDerived > &other) const
- Return
- the concatenation of two rotations as a MRP-MRP product 
 
 - 
template<class MatrixDerived>
 Derived &operator=(const MatrixBase<MatrixDerived> &xpr)¶
- Set - *thisfrom the expression xpr:
 Public Static Functions 
 - 
namespace internal¶
- 
template<int Arch, classDerived1, classDerived2, typenameScalar, int_Options>
 structmrp_product¶
- Public Static Functions - 
EIGEN_STRONG_INLINE MRP< Scalar > run (const MRPBase< Derived1 > &a, const MRPBase< Derived2 > &b)
 
- 
 - 
template<typename _Scalar, int _Options> traits< Map< const MRP< _Scalar >, _Options > > : public traits< MRP< _Scalar,(int(_Options)&Aligned)==Aligned ? AutoAlign :DontAlign > >
 - 
template<typename _Scalar, int _Options> traits< Map< MRP< _Scalar >, _Options > > : public traits< MRP< _Scalar,(int(_Options)&Aligned)==Aligned ? AutoAlign :DontAlign > >
- Public Types - 
typedef Map<Matrix<_Scalar, 3, 1>, _Options> Coefficients
 
- 
typedef Map<Matrix<_Scalar, 3, 1>, _Options> 
 
- 
template<int 
 
- 
template<typename