Path Tracer
|
Base class for quaternion expressions. More...
#include <Quaternion.h>
Public Types | |
enum | { Flags = Eigen::internal::traits<Derived>::Flags } |
typedef RotationBase< Derived, 3 > | Base |
typedef internal::traits< Derived >::Scalar | Scalar |
typedef NumTraits< Scalar >::Real | RealScalar |
typedef internal::traits< Derived >::Coefficients | Coefficients |
typedef Coefficients::CoeffReturnType | CoeffReturnType |
typedef internal::conditional< bool(internal::traits< Derived >::Flags &LvalueBit), Scalar &, CoeffReturnType >::type | NonConstCoeffReturnType |
typedef Matrix< Scalar, 3, 1 > | Vector3 |
typedef Matrix< Scalar, 3, 3 > | Matrix3 |
typedef AngleAxis< Scalar > | AngleAxisType |
Public Member Functions | |
EIGEN_DEVICE_FUNC CoeffReturnType | x () const |
EIGEN_DEVICE_FUNC CoeffReturnType | y () const |
EIGEN_DEVICE_FUNC CoeffReturnType | z () const |
EIGEN_DEVICE_FUNC CoeffReturnType | w () const |
EIGEN_DEVICE_FUNC NonConstCoeffReturnType | x () |
EIGEN_DEVICE_FUNC NonConstCoeffReturnType | y () |
EIGEN_DEVICE_FUNC NonConstCoeffReturnType | z () |
EIGEN_DEVICE_FUNC NonConstCoeffReturnType | w () |
EIGEN_DEVICE_FUNC const VectorBlock< const Coefficients, 3 > | vec () const |
EIGEN_DEVICE_FUNC VectorBlock< Coefficients, 3 > | vec () |
EIGEN_DEVICE_FUNC const internal::traits< Derived >::Coefficients & | coeffs () const |
EIGEN_DEVICE_FUNC internal::traits< Derived >::Coefficients & | coeffs () |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase< Derived > & | operator= (const QuaternionBase< Derived > &other) |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator= (const QuaternionBase< OtherDerived > &other) |
EIGEN_DEVICE_FUNC Derived & | operator= (const AngleAxisType &aa) |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Derived & | operator= (const MatrixBase< OtherDerived > &m) |
EIGEN_DEVICE_FUNC QuaternionBase & | setIdentity () |
EIGEN_DEVICE_FUNC Scalar | squaredNorm () const |
EIGEN_DEVICE_FUNC Scalar | norm () const |
EIGEN_DEVICE_FUNC void | normalize () |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | normalized () const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Scalar | dot (const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
EIGEN_DEVICE_FUNC Matrix3 | toRotationMatrix () const |
template<typename Derived1 , typename Derived2 > | |
EIGEN_DEVICE_FUNC Derived & | setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b) |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion< Scalar > | operator* (const QuaternionBase< OtherDerived > &q) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & | operator*= (const QuaternionBase< OtherDerived > &q) |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | inverse () const |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | conjugate () const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Quaternion< Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC bool | operator== (const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC bool | operator!= (const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC bool | isApprox (const QuaternionBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Vector3 | _transformVector (const Vector3 &v) const |
template<typename NewScalarType > | |
EIGEN_DEVICE_FUNC internal::enable_if< internal::is_same< Scalar, NewScalarType >::value, const Derived & >::type | cast () const |
template<typename NewScalarType > | |
EIGEN_DEVICE_FUNC internal::enable_if<!internal::is_same< Scalar, NewScalarType >::value, Quaternion< NewScalarType > >::type | cast () const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion< typename internal::traits< Derived >::Scalar > | operator* (const QuaternionBase< OtherDerived > &other) const |
template<class MatrixDerived > | |
EIGEN_DEVICE_FUNC Derived & | operator= (const MatrixBase< MatrixDerived > &xpr) |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC internal::traits< Derived >::Scalar | angularDistance (const QuaternionBase< OtherDerived > &other) const |
template<class OtherDerived > | |
EIGEN_DEVICE_FUNC Quaternion< typename internal::traits< Derived >::Scalar > | slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const |
EIGEN_DEVICE_FUNC Transform< Scalar, Dim, Isometry > | operator* (const Translation< Scalar, Dim > &t) const |
EIGEN_DEVICE_FUNC RotationMatrixType | operator* (const UniformScaling< Scalar > &s) const |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::rotation_base_generic_product_selector< Derived, OtherDerived, OtherDerived::IsVectorAtCompileTime >::ReturnType | operator* (const EigenBase< OtherDerived > &e) const |
template<int Mode, int Options> | |
EIGEN_DEVICE_FUNC Transform< Scalar, Dim, Mode > | operator* (const Transform< Scalar, Dim, Mode, Options > &t) const |
EIGEN_DEVICE_FUNC const Derived & | derived () const |
EIGEN_DEVICE_FUNC Derived & | derived () |
Static Public Member Functions | |
static EIGEN_DEVICE_FUNC Quaternion< Scalar > | Identity () |
Friends | |
std::ostream & | operator<< (std::ostream &s, const QuaternionBase< Derived > &q) |
template<typename OtherDerived > | |
EIGEN_DEVICE_FUNC RotationMatrixType | operator* (const EigenBase< OtherDerived > &l, const Derived &r) |
EIGEN_DEVICE_FUNC friend Transform< Scalar, Dim, Affine > | operator* (const DiagonalMatrix< Scalar, Dim > &l, const Derived &r) |
Base class for quaternion expressions.
\geometry_module
Derived | derived type (CRTP) |
typedef AngleAxis<Scalar> Eigen::QuaternionBase< Derived >::AngleAxisType |
the equivalent angle-axis type
typedef Matrix<Scalar,3,3> Eigen::QuaternionBase< Derived >::Matrix3 |
the equivalent rotation matrix type
typedef Matrix<Scalar,3,1> Eigen::QuaternionBase< Derived >::Vector3 |
the type of a 3D vector
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE QuaternionBase< Derived >::Vector3 Eigen::QuaternionBase< Derived >::_transformVector | ( | const Vector3 & | v | ) | const |
return the result vector of v through the rotation
Rotation of a vector by a quaternion.
|
inline |
|
inline |
|
inline |
|
inline |
*this
which is equal to the multiplicative inverse if the quaternion is normalized. The conjugate of a quaternion represents the opposite rotation.
|
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.
|
inlinestatic |
|
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.
|
inline |
true
if *this
is approximately equal to other, within the precision determined by prec.
|
inline |
|
inline |
Normalizes the quaternion *this
|
inline |
*this
|
inline |
*this
and other are not exactly equal to each other.
|
inline |
*this
with a generic expression e e can be:EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Quaternion<typename internal::traits<Derived>::Scalar> Eigen::QuaternionBase< Derived >::operator* | ( | const QuaternionBase< OtherDerived > & | other | ) | const |
|
inline |
*this
with a transformation t
|
inline |
*this
with a translation t
|
inline |
*this
with a uniform scaling s EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator*= | ( | const QuaternionBase< OtherDerived > & | other | ) |
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & Eigen::QuaternionBase< Derived >::operator= | ( | const AngleAxisType & | aa | ) |
Set *this
from an angle-axis aa and returns a reference to *this
|
inline |
Set *this
from the expression xpr:
|
inline |
*this
and other are all exactly equal.
|
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.
|
inline |
EIGEN_DEVICE_FUNC 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 in [0;1].This represents an interpolation for a constant motion between *this
and other, see also http://en.wikipedia.org/wiki/Slerp.
|
inline |
|
inline |
Convert the quaternion to a 3x3 rotation matrix. The quaternion is required to be normalized, otherwise the result is undefined.
|
inline |
|
inline |
|
inline |
w
coefficient (if Derived is a non-const lvalue)
|
inline |
w
coefficient
|
inline |
x
coefficient (if Derived is a non-const lvalue)
|
inline |
x
coefficient
|
inline |
y
coefficient (if Derived is a non-const lvalue)
|
inline |
y
coefficient
|
inline |
z
coefficient (if Derived is a non-const lvalue)
|
inline |
z
coefficient
|
friend |