Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Static Public Member Functions
Eigen::QuaternionBase< Derived > Class Template Reference

Base class for quaternion expressions. More...

#include <Quaternion.h>

+ Inheritance diagram for Eigen::QuaternionBase< Derived >:
+ Collaboration diagram for Eigen::QuaternionBase< Derived >:

Public Types

enum  { Flags = Eigen::internal::traits<Derived>::Flags }
 
typedef internal::traits< Derived >::Scalar Scalar
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef internal::traits< Derived >::Coefficients Coefficients
 
typedef Matrix< Scalar, 3, 1 > Vector3
 
typedef Matrix< Scalar, 3, 3 > Matrix3
 
typedef AngleAxis< Scalar > AngleAxisType
 
- Public Types inherited from Eigen::RotationBase< Derived, 3 >
enum  
 
enum  
 
typedef ei_traits< Derived >::Scalar Scalar
 
typedef internal::traits< Derived >::Scalar Scalar
 
typedef Matrix< Scalar, Dim, Dim > RotationMatrixType
 
typedef Matrix< Scalar, Dim, Dim > RotationMatrixType
 
typedef Matrix< Scalar, Dim, 1 > VectorType
 

Public Member Functions

Scalar x () const
 
Scalar y () const
 
Scalar z () const
 
Scalar w () const
 
Scalar & x ()
 
Scalar & y ()
 
Scalar & z ()
 
Scalar & w ()
 
const VectorBlock< const Coefficients, 3 > vec () const
 
VectorBlock< Coefficients, 3 > vec ()
 
const internal::traits< Derived >::Coefficients & coeffs () const
 
internal::traits< Derived >::Coefficients & coeffs ()
 
EIGEN_STRONG_INLINE QuaternionBase< Derived > & operator= (const QuaternionBase< Derived > &other)
 
template<class OtherDerived >
EIGEN_STRONG_INLINE Derived & operator= (const QuaternionBase< OtherDerived > &other)
 
Derived & operator= (const AngleAxisType &aa)
 
template<class OtherDerived >
Derived & operator= (const MatrixBase< OtherDerived > &m)
 
QuaternionBasesetIdentity ()
 
Scalar squaredNorm () const
 
Scalar norm () const
 
void normalize ()
 
Quaternion< Scalar > normalized () const
 
template<class OtherDerived >
Scalar dot (const QuaternionBase< OtherDerived > &other) const
 
template<class OtherDerived >
Scalar angularDistance (const QuaternionBase< OtherDerived > &other) const
 
Matrix3 toRotationMatrix () const
 
template<typename Derived1 , typename Derived2 >
Derived & setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b)
 
template<class OtherDerived >
EIGEN_STRONG_INLINE Quaternion< Scalar > operator* (const QuaternionBase< OtherDerived > &q) const
 
template<class OtherDerived >
EIGEN_STRONG_INLINE Derived & operator*= (const QuaternionBase< OtherDerived > &q)
 
Quaternion< Scalar > inverse () const
 
Quaternion< Scalar > conjugate () const
 
template<class OtherDerived >
Quaternion< Scalar > slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const
 
template<class OtherDerived >
bool isApprox (const QuaternionBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_STRONG_INLINE Vector3 _transformVector (Vector3 v) const
 
template<typename NewScalarType >
internal::cast_return_type< Derived, Quaternion< NewScalarType > >::type cast () const
 
template<class OtherDerived >
EIGEN_STRONG_INLINE Quaternion< typename internal::traits< Derived >::Scalar > operator* (const QuaternionBase< OtherDerived > &other) const
 
template<class MatrixDerived >
Derived & operator= (const MatrixBase< MatrixDerived > &xpr)
 
template<class OtherDerived >
internal::traits< Derived >::Scalar angularDistance (const QuaternionBase< OtherDerived > &other) const
 
template<class OtherDerived >
Quaternion< typename internal::traits< Derived >::Scalar > slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const
 
- Public Member Functions inherited from Eigen::RotationBase< Derived, 3 >
const Derived & derived () const
 
Derived & derived ()
 
const Derived & derived () const
 
Derived & derived ()
 
RotationMatrixType toRotationMatrix () const
 
RotationMatrixType toRotationMatrix () const
 
Derived inverse () const
 
Derived inverse () const
 
Transform< Scalar, Dim > operator* (const Translation< Scalar, Dim > &t) const
 
RotationMatrixType operator* (const Scaling< Scalar, Dim > &s) const
 
Transform< Scalar, Dim > operator* (const Transform< Scalar, Dim > &t) const
 
Transform< Scalar, Dim, Isometry > operator* (const Translation< Scalar, Dim > &t) const
 
RotationMatrixType operator* (const UniformScaling< Scalar > &s) const
 
EIGEN_STRONG_INLINE internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType operator* (const EigenBase< OtherDerived > &e) const
 
Transform< Scalar, Dim, Mode > operator* (const Transform< Scalar, Dim, Mode, Options > &t) const
 
RotationMatrixType matrix () const
 
VectorType _transformVector (const OtherVectorType &v) const
 

Static Public Member Functions

static Quaternion< Scalar > Identity ()
 

Detailed Description

template<class Derived>
class Eigen::QuaternionBase< Derived >

Base class for quaternion expressions.

Template Parameters
Derivedderived type (CRTP)
See also
class Quaternion

Definition at line 233 of file ForwardDeclarations.h.

Member Typedef Documentation

template<class Derived>
typedef AngleAxis<Scalar> Eigen::QuaternionBase< Derived >::AngleAxisType

the equivalent angle-axis type

Definition at line 55 of file Quaternion.h.

template<class Derived>
typedef Matrix<Scalar,3,3> Eigen::QuaternionBase< Derived >::Matrix3

the equivalent rotation matrix type

Definition at line 53 of file Quaternion.h.

template<class Derived>
typedef Matrix<Scalar,3,1> Eigen::QuaternionBase< Derived >::Vector3

the type of a 3D vector

Definition at line 51 of file Quaternion.h.

Member Function Documentation

template<class Derived >
EIGEN_STRONG_INLINE QuaternionBase< Derived >::Vector3 Eigen::QuaternionBase< Derived >::_transformVector ( Vector3  v) const

return the result vector of v through the rotation

Rotation of a vector by a quaternion.

Remarks
If the quaternion 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:
  • Quaternion2: 30n
  • Via a Matrix3: 24 + 15n

Definition at line 466 of file Quaternion.h.

467 {
468  // Note that this algorithm comes from the optimization by hand
469  // of the conversion to a Matrix followed by a Matrix/Vector product.
470  // It appears to be much faster than the common algorithm found
471  // in the litterature (30 versus 39 flops). It also requires two
472  // Vector3 as temporaries.
473  Vector3 uv = this->vec().cross(v);
474  uv += uv;
475  return v + this->w() * uv + this->vec().cross(uv);
476 }
const VectorBlock< const Coefficients, 3 > vec() const
Definition: Quaternion.h:78
Matrix< Scalar, 3, 1 > Vector3
Definition: Quaternion.h:51
Scalar w() const
Definition: Quaternion.h:66
template<class Derived>
template<class OtherDerived >
internal::traits<Derived>::Scalar Eigen::QuaternionBase< Derived >::angularDistance ( const QuaternionBase< OtherDerived > &  other) const
inline
Returns
the angle (in radian) between two rotations
See also
dot()

Definition at line 670 of file Quaternion.h.

671 {
672  using std::acos;
673  using std::abs;
674  double d = abs(this->dot(other));
675  if (d>=1.0)
676  return Scalar(0);
677  return static_cast<Scalar>(2 * acos(d));
678 }
Scalar dot(const QuaternionBase< OtherDerived > &other) const
Definition: Quaternion.h:133
template<class Derived>
template<typename NewScalarType >
internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type Eigen::QuaternionBase< Derived >::cast ( ) const
inline
Returns
*this with scalar type casted to NewScalarType

Note that if NewScalarType is equal to the current scalar type of *this then this function smartly returns a const reference to *this.

Definition at line 176 of file Quaternion.h.

177  {
178  return typename internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type(derived());
179  }
template<class Derived>
const internal::traits<Derived>::Coefficients& Eigen::QuaternionBase< Derived >::coeffs ( ) const
inline
Returns
a read-only vector expression of the coefficients (x,y,z,w)

Definition at line 84 of file Quaternion.h.

84 { return derived().coeffs(); }
template<class Derived>
internal::traits<Derived>::Coefficients& Eigen::QuaternionBase< Derived >::coeffs ( )
inline
Returns
a vector expression of the coefficients (x,y,z,w)

Definition at line 87 of file Quaternion.h.

87 { return derived().coeffs(); }
template<class Derived >
Quaternion< typename internal::traits< Derived >::Scalar > Eigen::QuaternionBase< Derived >::conjugate ( void  ) const
inline
Returns
the conjugated quaternion
the conjugate of the *this which is equal to the multiplicative inverse if the quaternion is normalized. The conjugate of a quaternion represents the opposite rotation.
See also
Quaternion2::inverse()

Definition at line 659 of file Quaternion.h.

660 {
661  return Quaternion<Scalar>(this->w(),-this->x(),-this->y(),-this->z());
662 }
Scalar z() const
Definition: Quaternion.h:64
Scalar w() const
Definition: Quaternion.h:66
Scalar y() const
Definition: Quaternion.h:62
Scalar x() const
Definition: Quaternion.h:60
template<class Derived>
template<class OtherDerived >
Scalar Eigen::QuaternionBase< Derived >::dot ( const QuaternionBase< OtherDerived > &  other) const
inline
Returns
the dot product of *this and other Geometrically speaking, the dot product of two unit quaternions corresponds to the cosine of half the angle between the two rotations.
See also
angularDistance()

Definition at line 133 of file Quaternion.h.

133 { return coeffs().dot(other.coeffs()); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
static Quaternion<Scalar> Eigen::QuaternionBase< Derived >::Identity ( )
inlinestatic
Returns
a quaternion representing an identity rotation
See also
MatrixBase::Identity()

Definition at line 105 of file Quaternion.h.

105 { return Quaternion<Scalar>(1, 0, 0, 0); }
template<class Derived >
Quaternion< typename internal::traits< Derived >::Scalar > Eigen::QuaternionBase< Derived >::inverse ( void  ) const
inline
Returns
the quaternion describing the inverse rotation
the multiplicative inverse of *this Note that in most cases, i.e., if you simply want the opposite rotation, and/or the quaternion is normalized, then it is enough to use the conjugate.
See also
QuaternionBase::conjugate()

Definition at line 638 of file Quaternion.h.

639 {
640  // FIXME should this function be called multiplicativeInverse and conjugate() be called inverse() or opposite() ??
641  Scalar n2 = this->squaredNorm();
642  if (n2 > 0)
643  return Quaternion<Scalar>(conjugate().coeffs() / n2);
644  else
645  {
646  // return an invalid result to flag the error
647  return Quaternion<Scalar>(Coefficients::Zero());
648  }
649 }
Scalar squaredNorm() const
Definition: Quaternion.h:114
Quaternion< Scalar > conjugate() const
Definition: Quaternion.h:659
template<class Derived>
template<class OtherDerived >
bool Eigen::QuaternionBase< Derived >::isApprox ( const QuaternionBase< OtherDerived > &  other,
const RealScalar &  prec = NumTraits<Scalar>::dummy_precision() 
) const
inline
Returns
true if *this is approximately equal to other, within the precision determined by prec.
See also
MatrixBase::isApprox()

Definition at line 164 of file Quaternion.h.

165  { return coeffs().isApprox(other.coeffs(), prec); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
Scalar Eigen::QuaternionBase< Derived >::norm ( ) const
inline
Returns
the norm of the quaternion's coefficients
See also
QuaternionBase::squaredNorm(), MatrixBase::norm()

Definition at line 119 of file Quaternion.h.

119 { return coeffs().norm(); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
void Eigen::QuaternionBase< Derived >::normalize ( void  )
inline

Normalizes the quaternion *this

See also
normalized(), MatrixBase::normalize()

Definition at line 123 of file Quaternion.h.

123 { coeffs().normalize(); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
Quaternion<Scalar> Eigen::QuaternionBase< Derived >::normalized ( ) const
inline
Returns
a normalized copy of *this
See also
normalize(), MatrixBase::normalized()

Definition at line 126 of file Quaternion.h.

126 { return Quaternion<Scalar>(coeffs().normalized()); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
template<class OtherDerived >
EIGEN_STRONG_INLINE Quaternion<typename internal::traits<Derived>::Scalar> Eigen::QuaternionBase< Derived >::operator* ( const QuaternionBase< OtherDerived > &  other) const
Returns
the concatenation of two rotations as a quaternion-quaternion product

Definition at line 439 of file Quaternion.h.

440 {
441  EIGEN_STATIC_ASSERT((internal::is_same<typename Derived::Scalar, typename OtherDerived::Scalar>::value),
442  YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
443  return internal::quat_product<Architecture::Target, Derived, OtherDerived,
444  typename internal::traits<Derived>::Scalar,
445  internal::traits<Derived>::IsAligned && internal::traits<OtherDerived>::IsAligned>::run(*this, other);
446 }
template<class Derived >
template<class OtherDerived >
EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator*= ( const QuaternionBase< OtherDerived > &  other)
See also
operator*(Quaternion)

Definition at line 451 of file Quaternion.h.

452 {
453  derived() = derived() * other.derived();
454  return derived();
455 }
template<class Derived>
EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator= ( const AngleAxisType aa)

Set *this from an angle-axis aa and returns a reference to *this

Definition at line 496 of file Quaternion.h.

497 {
498  using std::cos;
499  using std::sin;
500  Scalar ha = Scalar(0.5)*aa.angle(); // Scalar(0.5) to suppress precision loss warnings
501  this->w() = cos(ha);
502  this->vec() = sin(ha) * aa.axis();
503  return derived();
504 }
const VectorBlock< const Coefficients, 3 > vec() const
Definition: Quaternion.h:78
Scalar w() const
Definition: Quaternion.h:66
template<class Derived>
template<class MatrixDerived >
Derived& Eigen::QuaternionBase< Derived >::operator= ( const MatrixBase< MatrixDerived > &  xpr)
inline

Set *this from the expression xpr:

  • if xpr is a 4x1 vector, then xpr is assumed to be a quaternion
  • if xpr is a 3x3 matrix, then xpr is assumed to be rotation matrix and xpr is converted to a quaternion

Definition at line 514 of file Quaternion.h.

515 {
516  EIGEN_STATIC_ASSERT((internal::is_same<typename Derived::Scalar, typename MatrixDerived::Scalar>::value),
517  YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
518  internal::quaternionbase_assign_impl<MatrixDerived>::run(*this, xpr.derived());
519  return derived();
520 }
template<class Derived >
template<typename Derived1 , typename Derived2 >
Derived & Eigen::QuaternionBase< Derived >::setFromTwoVectors ( const MatrixBase< Derived1 > &  a,
const MatrixBase< Derived2 > &  b 
)
inline
Returns
the quaternion which transform a into b through a rotation

Sets *this to be a quaternion 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.

Returns
a reference to *this.

Note that the two input vectors do not have to be normalized, and do not need to have the same norm.

Definition at line 573 of file Quaternion.h.

574 {
575  using std::max;
576  using std::sqrt;
577  Vector3 v0 = a.normalized();
578  Vector3 v1 = b.normalized();
579  Scalar c = v1.dot(v0);
580 
581  // if dot == -1, vectors are nearly opposites
582  // => accuraletly compute the rotation axis by computing the
583  // intersection of the two planes. This is done by solving:
584  // x^T v0 = 0
585  // x^T v1 = 0
586  // under the constraint:
587  // ||x|| = 1
588  // which yields a singular value problem
589  if (c < Scalar(-1)+NumTraits<Scalar>::dummy_precision())
590  {
591  c = max<Scalar>(c,-1);
592  Matrix<Scalar,2,3> m; m << v0.transpose(), v1.transpose();
593  JacobiSVD<Matrix<Scalar,2,3> > svd(m, ComputeFullV);
594  Vector3 axis = svd.matrixV().col(2);
595 
596  Scalar w2 = (Scalar(1)+c)*Scalar(0.5);
597  this->w() = sqrt(w2);
598  this->vec() = axis * sqrt(Scalar(1) - w2);
599  return derived();
600  }
601  Vector3 axis = v0.cross(v1);
602  Scalar s = sqrt((Scalar(1)+c)*Scalar(2));
603  Scalar invs = Scalar(1)/s;
604  this->vec() = axis * invs;
605  this->w() = s * Scalar(0.5);
606 
607  return derived();
608 }
const VectorBlock< const Coefficients, 3 > vec() const
Definition: Quaternion.h:78
Matrix< Scalar, 3, 1 > Vector3
Definition: Quaternion.h:51
Scalar w() const
Definition: Quaternion.h:66
template<class Derived>
QuaternionBase& Eigen::QuaternionBase< Derived >::setIdentity ( )
inline
See also
QuaternionBase::Identity(), MatrixBase::setIdentity()

Definition at line 109 of file Quaternion.h.

109 { coeffs() << 0, 0, 0, 1; return *this; }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
template<class OtherDerived >
Quaternion<Scalar> Eigen::QuaternionBase< Derived >::slerp ( const Scalar &  t,
const QuaternionBase< OtherDerived > &  other 
) const
Returns
an interpolation for a constant motion between other and *this t in [0;1] see http://en.wikipedia.org/wiki/Slerp
template<class Derived>
template<class OtherDerived >
Quaternion<typename internal::traits<Derived>::Scalar> Eigen::QuaternionBase< Derived >::slerp ( const Scalar &  t,
const QuaternionBase< OtherDerived > &  other 
) const
Returns
the spherical linear interpolation between the two quaternions *this and other at the parameter t

Definition at line 686 of file Quaternion.h.

687 {
688  using std::acos;
689  using std::sin;
690  using std::abs;
691  static const Scalar one = Scalar(1) - NumTraits<Scalar>::epsilon();
692  Scalar d = this->dot(other);
693  Scalar absD = abs(d);
694 
695  Scalar scale0;
696  Scalar scale1;
697 
698  if(absD>=one)
699  {
700  scale0 = Scalar(1) - t;
701  scale1 = t;
702  }
703  else
704  {
705  // theta is the angle between the 2 quaternions
706  Scalar theta = acos(absD);
707  Scalar sinTheta = sin(theta);
708 
709  scale0 = sin( ( Scalar(1) - t ) * theta) / sinTheta;
710  scale1 = sin( ( t * theta) ) / sinTheta;
711  }
712  if(d<0) scale1 = -scale1;
713 
714  return Quaternion<Scalar>(scale0 * coeffs() + scale1 * other.coeffs());
715 }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
Scalar dot(const QuaternionBase< OtherDerived > &other) const
Definition: Quaternion.h:133
template<class Derived>
Scalar Eigen::QuaternionBase< Derived >::squaredNorm ( ) const
inline
Returns
the squared norm of the quaternion's coefficients
See also
QuaternionBase::norm(), MatrixBase::squaredNorm()

Definition at line 114 of file Quaternion.h.

114 { return coeffs().squaredNorm(); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived >
QuaternionBase< Derived >::Matrix3 Eigen::QuaternionBase< Derived >::toRotationMatrix ( void  ) const
inline
Returns
an equivalent 3x3 rotation matrix

Convert the quaternion to a 3x3 rotation matrix. The quaternion is required to be normalized, otherwise the result is undefined.

Definition at line 527 of file Quaternion.h.

528 {
529  // NOTE if inlined, then gcc 4.2 and 4.4 get rid of the temporary (not gcc 4.3 !!)
530  // if not inlined then the cost of the return by value is huge ~ +35%,
531  // however, not inlining this function is an order of magnitude slower, so
532  // it has to be inlined, and so the return by value is not an issue
533  Matrix3 res;
534 
535  const Scalar tx = Scalar(2)*this->x();
536  const Scalar ty = Scalar(2)*this->y();
537  const Scalar tz = Scalar(2)*this->z();
538  const Scalar twx = tx*this->w();
539  const Scalar twy = ty*this->w();
540  const Scalar twz = tz*this->w();
541  const Scalar txx = tx*this->x();
542  const Scalar txy = ty*this->x();
543  const Scalar txz = tz*this->x();
544  const Scalar tyy = ty*this->y();
545  const Scalar tyz = tz*this->y();
546  const Scalar tzz = tz*this->z();
547 
548  res.coeffRef(0,0) = Scalar(1)-(tyy+tzz);
549  res.coeffRef(0,1) = txy-twz;
550  res.coeffRef(0,2) = txz+twy;
551  res.coeffRef(1,0) = txy+twz;
552  res.coeffRef(1,1) = Scalar(1)-(txx+tzz);
553  res.coeffRef(1,2) = tyz-twx;
554  res.coeffRef(2,0) = txz-twy;
555  res.coeffRef(2,1) = tyz+twx;
556  res.coeffRef(2,2) = Scalar(1)-(txx+tyy);
557 
558  return res;
559 }
Scalar z() const
Definition: Quaternion.h:64
Scalar w() const
Definition: Quaternion.h:66
Scalar y() const
Definition: Quaternion.h:62
Matrix< Scalar, 3, 3 > Matrix3
Definition: Quaternion.h:53
Scalar x() const
Definition: Quaternion.h:60
template<class Derived>
const VectorBlock<const Coefficients,3> Eigen::QuaternionBase< Derived >::vec ( ) const
inline
Returns
a read-only vector expression of the imaginary part (x,y,z)

Definition at line 78 of file Quaternion.h.

78 { return coeffs().template head<3>(); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
VectorBlock<Coefficients,3> Eigen::QuaternionBase< Derived >::vec ( )
inline
Returns
a vector expression of the imaginary part (x,y,z)

Definition at line 81 of file Quaternion.h.

81 { return coeffs().template head<3>(); }
const internal::traits< Derived >::Coefficients & coeffs() const
Definition: Quaternion.h:84
template<class Derived>
Scalar Eigen::QuaternionBase< Derived >::w ( ) const
inline
Returns
the w coefficient

Definition at line 66 of file Quaternion.h.

66 { return this->derived().coeffs().coeff(3); }
template<class Derived>
Scalar& Eigen::QuaternionBase< Derived >::w ( )
inline
Returns
a reference to the w coefficient

Definition at line 75 of file Quaternion.h.

75 { return this->derived().coeffs().coeffRef(3); }
template<class Derived>
Scalar Eigen::QuaternionBase< Derived >::x ( ) const
inline
Returns
the x coefficient

Definition at line 60 of file Quaternion.h.

60 { return this->derived().coeffs().coeff(0); }
template<class Derived>
Scalar& Eigen::QuaternionBase< Derived >::x ( )
inline
Returns
a reference to the x coefficient

Definition at line 69 of file Quaternion.h.

69 { return this->derived().coeffs().coeffRef(0); }
template<class Derived>
Scalar Eigen::QuaternionBase< Derived >::y ( ) const
inline
Returns
the y coefficient

Definition at line 62 of file Quaternion.h.

62 { return this->derived().coeffs().coeff(1); }
template<class Derived>
Scalar& Eigen::QuaternionBase< Derived >::y ( )
inline
Returns
a reference to the y coefficient

Definition at line 71 of file Quaternion.h.

71 { return this->derived().coeffs().coeffRef(1); }
template<class Derived>
Scalar Eigen::QuaternionBase< Derived >::z ( ) const
inline
Returns
the z coefficient

Definition at line 64 of file Quaternion.h.

64 { return this->derived().coeffs().coeff(2); }
template<class Derived>
Scalar& Eigen::QuaternionBase< Derived >::z ( )
inline
Returns
a reference to the z coefficient

Definition at line 73 of file Quaternion.h.

73 { return this->derived().coeffs().coeffRef(2); }

The documentation for this class was generated from the following files: