![]() |
Shapeworks Studio
2.1
Shape analysis software suite
|
Base class for quaternion expressions. More...
#include <Quaternion.h>
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 |
![]() | |
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) |
QuaternionBase & | setIdentity () |
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 |
![]() | |
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 () |
Base class for quaternion expressions.
Derived | derived type (CRTP) |
Definition at line 233 of file ForwardDeclarations.h.
typedef AngleAxis<Scalar> Eigen::QuaternionBase< Derived >::AngleAxisType |
the equivalent angle-axis type
Definition at line 55 of file Quaternion.h.
typedef Matrix<Scalar,3,3> Eigen::QuaternionBase< Derived >::Matrix3 |
the equivalent rotation matrix type
Definition at line 53 of file Quaternion.h.
typedef Matrix<Scalar,3,1> Eigen::QuaternionBase< Derived >::Vector3 |
the type of a 3D vector
Definition at line 51 of file Quaternion.h.
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.
Definition at line 466 of file Quaternion.h.
|
inline |
Definition at line 670 of file Quaternion.h.
|
inline |
*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.
|
inline |
Definition at line 84 of file Quaternion.h.
|
inline |
Definition at line 87 of file Quaternion.h.
|
inline |
*this
which is equal to the multiplicative inverse if the quaternion is normalized. The conjugate of a quaternion represents the opposite rotation.Definition at line 659 of file Quaternion.h.
|
inline |
*this
and other Geometrically speaking, the dot product of two unit quaternions corresponds to the cosine of half the angle between the two rotations. Definition at line 133 of file Quaternion.h.
|
inlinestatic |
Definition at line 105 of file Quaternion.h.
|
inline |
*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.Definition at line 638 of file Quaternion.h.
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.Definition at line 164 of file Quaternion.h.
|
inline |
Definition at line 119 of file Quaternion.h.
|
inline |
Normalizes the quaternion *this
Definition at line 123 of file Quaternion.h.
|
inline |
*this
Definition at line 126 of file Quaternion.h.
EIGEN_STRONG_INLINE Quaternion<typename internal::traits<Derived>::Scalar> Eigen::QuaternionBase< Derived >::operator* | ( | const QuaternionBase< OtherDerived > & | other | ) | const |
Definition at line 439 of file Quaternion.h.
EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator*= | ( | const QuaternionBase< OtherDerived > & | other | ) |
Definition at line 451 of file Quaternion.h.
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.
|
inline |
Set *this
from the expression xpr:
Definition at line 514 of file Quaternion.h.
|
inline |
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.
*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.
|
inline |
Definition at line 109 of file Quaternion.h.
Quaternion<Scalar> Eigen::QuaternionBase< Derived >::slerp | ( | const Scalar & | t, |
const QuaternionBase< OtherDerived > & | other | ||
) | const |
*this
t in [0;1] see http://en.wikipedia.org/wiki/Slerp Quaternion<typename internal::traits<Derived>::Scalar> Eigen::QuaternionBase< Derived >::slerp | ( | const Scalar & | t, |
const QuaternionBase< OtherDerived > & | other | ||
) | const |
*this
and other at the parameter t Definition at line 686 of file Quaternion.h.
|
inline |
Definition at line 114 of file Quaternion.h.
|
inline |
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.
|
inline |
Definition at line 78 of file Quaternion.h.
|
inline |
Definition at line 81 of file Quaternion.h.
|
inline |
w
coefficient Definition at line 66 of file Quaternion.h.
|
inline |
w
coefficient Definition at line 75 of file Quaternion.h.
|
inline |
x
coefficient Definition at line 60 of file Quaternion.h.
|
inline |
x
coefficient Definition at line 69 of file Quaternion.h.
|
inline |
y
coefficient Definition at line 62 of file Quaternion.h.
|
inline |
y
coefficient Definition at line 71 of file Quaternion.h.
|
inline |
z
coefficient Definition at line 64 of file Quaternion.h.
|
inline |
z
coefficient Definition at line 73 of file Quaternion.h.