Expression of a quaternion from a memory buffer.
More...
#include <Quaternion.h>
|
| Vector3 | _transformVector (Vector3 v) const |
| |
| internal::traits< Map< Quaternion< _Scalar >, _Options > >::Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
| |
| internal::cast_return_type< Map< Quaternion< _Scalar >, _Options >, Quaternion< NewScalarType > >::type | cast () const |
| |
| Quaternion< Scalar > | conjugate () const |
| |
| Scalar | dot (const QuaternionBase< OtherDerived > &other) const |
| |
| Quaternion< Scalar > | inverse () const |
| |
| bool | isApprox (const QuaternionBase< OtherDerived > &other, RealScalar prec=NumTraits< Scalar >::dummy_precision()) const |
| |
| | Map (Scalar *coeffs) |
| |
| RotationMatrixType | matrix () const |
| |
| Scalar | norm () const |
| |
| void | normalize () |
| |
| Quaternion< Scalar > | normalized () const |
| |
| Transform< Scalar, Dim, Isometry > | operator * (const Translation< Scalar, Dim > &t) const |
| |
| RotationMatrixType | operator * (const UniformScaling< Scalar > &s) const |
| |
| internal::rotation_base_generic_product_selector< Map< Quaternion< _Scalar >, _Options >, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator * (const EigenBase< OtherDerived > &e) const |
| |
| Transform< Scalar, Dim, Mode > | operator * (const Transform< Scalar, Dim, Mode, Options > &t) const |
| |
| Quaternion< typename internal::traits< Map< Quaternion< _Scalar >, _Options > >::Scalar > | operator * (const QuaternionBase< OtherDerived > &other) const |
| |
| Map< Quaternion< _Scalar >, _Options > & | operator *= (const QuaternionBase< OtherDerived > &q) |
| |
| Map< Quaternion< _Scalar >, _Options > & | setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
| |
| QuaternionBase & | setIdentity () |
| |
| Quaternion< Scalar > | slerp (Scalar t, const QuaternionBase< OtherDerived > &other) const |
| |
| Quaternion< typename internal::traits< Map< Quaternion< _Scalar >, _Options > >::Scalar > | slerp (Scalar t, const QuaternionBase< OtherDerived > &other) const |
| |
| Scalar | squaredNorm () const |
| |
| Matrix3 | toRotationMatrix () const |
| |
| const VectorBlock< const Coefficients, 3 > | vec () const |
| |
| VectorBlock< Coefficients, 3 > | vec () |
| |
| Scalar | w () const |
| |
| Scalar & | w () |
| |
| Scalar | x () const |
| |
| Scalar & | x () |
| |
| Scalar | y () const |
| |
| Scalar & | y () |
| |
| Scalar | z () const |
| |
| Scalar & | z () |
| |
template<typename _Scalar, int _Options>
class Eigen::Map< Quaternion< _Scalar >, _Options >
Expression of a quaternion from a memory buffer.
- Parameters
-
| _Scalar | the type of the Quaternion coefficients |
| _Options | see class Map |
This is a specialization of class Map for Quaternion. This class allows to view a 4 scalar memory buffer as an Eigen's Quaternion object.
- See also
- class Map, class Quaternion, class QuaternionBase
◆ AngleAxisType
the equivalent angle-axis type
◆ Matrix3
the equivalent rotation matrix type
◆ RotationMatrixType
corresponding linear transformation matrix type
◆ Vector3
◆ Map()
Constructs a Mapped Quaternion object from the pointer coeffs
The pointer coeffs must reference the four coeffecients of Quaternion in the following order:
If the template parameter _Options is set to #Aligned, then the pointer coeffs must be aligned.
◆ _transformVector()
return the result vector of v through the rotation
Rotation of a vector by a quaternion.
◆ angularDistance()
| internal::traits<Map< Quaternion< _Scalar >, _Options > >::Scalar angularDistance |
( |
const QuaternionBase< OtherDerived > & |
other | ) |
const |
|
inlineinherited |
- Returns
- the angle (in radian) between two rotations
- See also
- dot()
◆ cast()
| internal::cast_return_type<Map< Quaternion< _Scalar >, _Options > ,Quaternion<NewScalarType> >::type cast |
( |
| ) |
const |
|
inlineinherited |
- 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.
◆ conjugate()
- 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()
◆ dot()
- 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()
◆ Identity()
◆ inverse()
- 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()
◆ isApprox()
- Returns
true if *this is approximately equal to other, within the precision determined by prec.
- See also
- MatrixBase::isApprox()
◆ matrix()
- Returns
- an equivalent rotation matrix This function is added to be conform with the Transform class' naming scheme.
◆ norm()
◆ normalize()
◆ normalized()
◆ operator *() [1/5]
- Returns
- the concatenation of the rotation
*this with a translation t
◆ operator *() [2/5]
- Returns
- the concatenation of the rotation
*this with a uniform scaling s
◆ operator *() [3/5]
| internal::rotation_base_generic_product_selector<Map< Quaternion< _Scalar >, _Options > ,OtherDerived,OtherDerived::IsVectorAtCompileTime>::ReturnType operator * |
( |
const EigenBase< OtherDerived > & |
e | ) |
const |
|
inlineinherited |
- Returns
- the concatenation of the rotation
*this with a generic expression e e can be:
- a DimxDim linear transformation matrix
- a DimxDim diagonal matrix (axis aligned scaling)
- a vector of size Dim
◆ operator *() [4/5]
- Returns
- the concatenation of the rotation
*this with a transformation t
◆ operator *() [5/5]
- Returns
- the concatenation of two rotations as a quaternion-quaternion product
◆ operator *=()
- See also
- operator*(Quaternion)
◆ setFromTwoVectors()
- 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.
◆ setIdentity()
◆ slerp() [1/2]
◆ slerp() [2/2]
- Returns
- the spherical linear interpolation between the two quaternions
*this and other at the parameter t
◆ squaredNorm()
| Scalar squaredNorm |
( |
| ) |
const |
|
inlineinherited |
◆ toRotationMatrix()
- 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.
◆ vec() [1/2]
- Returns
- a read-only vector expression of the imaginary part (x,y,z)
◆ vec() [2/2]
- Returns
- a vector expression of the imaginary part (x,y,z)
◆ w() [1/2]
◆ w() [2/2]
- Returns
- a reference to the
w coefficient
◆ x() [1/2]
◆ x() [2/2]
- Returns
- a reference to the
x coefficient
◆ y() [1/2]
◆ y() [2/2]
- Returns
- a reference to the
y coefficient
◆ z() [1/2]
◆ z() [2/2]
- Returns
- a reference to the
z coefficient
The documentation for this class was generated from the following file: