Spec-Zone.ru › Eigen3

Eigen::QuaternionBase

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

Базовый класс для выражений кватерниона.

Определен в модуле Geometry.

#include <Eigen/Geometry> 
Параметры шаблона
Derived производный тип (CRTP)
См. также
класс Quaternion
Inheritance graph
typedef AngleAxis< Scalar > AngleAxisType
typedef Matrix< Scalar, 3, 3 > Matrix3
typedef Matrix< Scalar, 3, 1 > Vector3
- Публичные типы, унаследованные от Eigen::RotationBase< Derived, 3 >
typedef Matrix< Scalar, Dim, Dim > RotationMatrixType
typedef internal::traits< Derived >::Scalar Scalar
Vector3 _transformVector (const Vector3 &v) const
template<class OtherDerived >
internal::traits< Derived >::Scalar angularDistance (const QuaternionBase< OtherDerived > &other) const
template<typename NewScalarType >
internal::cast_return_type< Derived, Quaternion< NewScalarType > >::type cast () const
internal::traits< Derived >::Coefficients & coeffs ()
const internal::traits< Derived >::Coefficients & coeffs () const
Quaternion< Scalar > conjugate () const
template<class OtherDerived >
Scalar dot (const QuaternionBase< OtherDerived > &other) const
Quaternion< Scalar > inverse () const
template<class OtherDerived >
bool isApprox (const QuaternionBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Scalar norm () const
void normalize ()
Quaternion< Scalar > normalized () const
template<class OtherDerived >
bool operator!= (const QuaternionBase< OtherDerived > &other) const
template<class OtherDerived >
Quaternion< typename internal::traits< Derived >::Scalar > operator* (const QuaternionBase< OtherDerived > &other) const
template<class OtherDerived >
Derived & operator*= (const QuaternionBase< OtherDerived > &q)
Derived & operator= (const AngleAxisType &aa)
template<class MatrixDerived >
Derived & operator= (const MatrixBase< MatrixDerived > &xpr)
template<class OtherDerived >
bool operator== (const QuaternionBase< OtherDerived > &other) const
template<typename Derived1 , typename Derived2 >
Derived & setFromTwoVectors (const MatrixBase< Derived1 > &a, const MatrixBase< Derived2 > &b)
QuaternionBase & setIdentity ()
template<class OtherDerived >
Quaternion< typename internal::traits< Derived >::Scalar > slerp (const Scalar &t, const QuaternionBase< OtherDerived > &other) const
Scalar squaredNorm () const
Matrix3 toRotationMatrix () const
VectorBlock< Coefficients, 3 > vec ()
const VectorBlock< const Coefficients, 3 > vec () const
NonConstCoeffReturnType w ()
CoeffReturnType w () const
NonConstCoeffReturnType x ()
CoeffReturnType x () const
NonConstCoeffReturnType y ()
CoeffReturnType y () const
NonConstCoeffReturnType z ()
CoeffReturnType z () const
- Общедоступные члены-функции, унаследованные от Eigen::RotationBase< Derived, 3 >
Derived inverse () const
RotationMatrixType matrix () const
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
END_OF_DOCUMENT_MARKER
Transform< Scalar, Dim, Isometry > operator* (const Translation< Scalar, Dim > &t) const
RotationMatrixType operator* (const UniformScaling< Scalar > &s) const
RotationMatrixType toRotationMatrix () const
static Quaternion< Scalar > Identity ()

ТипAngleAxis

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

эквивалентный тип угол-ось

Matrix3

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

эквивалентный тип матрицы вращения

Vector3

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

тип 3D вектора

_transformVector()

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

возвращает результат вектора v после вращения

Вращение вектора с помощью кватерниона.

Примечания
Если кватернион используется для вращения нескольких точек (>1), то гораздо эффективнее сначала преобразовать его в 3x3 Матрицу. Сравнение затрат операции для n преобразований:
  • Quaternion2: 30n
  • Через Matrix3: 24 + 15n

angularDistance()

template<class Derived >
template<class OtherDerived >
internal::traits<Derived>::Scalar Eigen::QuaternionBase< Derived >::angularDistance ( const QuaternionBase< OtherDerived > & other ) const
inline
Возвращает
угол (в радианах) между двумя вращениями
См. также
dot()

cast()

template<class Derived >
template<typename NewScalarType >
internal::cast_return_type<Derived,Quaternion<NewScalarType> >::type Eigen::QuaternionBase< Derived >::cast ( ) const
inline
Возвращает
с тем же типом *this со скалярным типом, преобразованным в NewScalarType

Обратите внимание, что если NewScalarType равен текущему скалярному типу *this, то эта функция умно возвращает константную ссылку на *this.

coeffs() [1/2]

template<class Derived >
internal::traits<Derived>::Coefficients& Eigen::QuaternionBase< Derived >::coeffs ( )
inline
Возвращает
векторное выражение коэффициентов (x,y,z,w)

coeffs() [2/2]

template<class Derived >
const internal::traits<Derived>::Coefficients& Eigen::QuaternionBase< Derived >::coeffs ( ) const
inline
Возвращает
только для чтения векторное выражение коэффициентов (x,y,z,w)

conjugate()

template<class Derived >
Quaternion< typename internal::traits< Derived >::Scalar > Eigen::QuaternionBase< Derived >::conjugate ( void ) const
inline
Возвращает
сопряженный кватернион
сопряженный *this, равный мультипликативной обратной, если кватернион нормирован. Сопряженный кватернион представляет противоположное вращение.
См. также
Quaternion2::inverse()

dot()

template<class Derived >
template<class OtherDerived >
Scalar Eigen::QuaternionBase< Derived >::dot ( const QuaternionBase< OtherDerived > & other ) const
inline
Возвращает
скалярное произведение *this и other. Геометрически скалярное произведение двух единичных кватернионов соответствует косинусу половины угла между двумя вращениями.
См. также
angularDistance()

Identity()

template<class Derived >
static Quaternion<Scalar> Eigen::QuaternionBase< Derived >::Identity ( )
inlinestatic
Возвращает
кватернион, представляющий тождественное вращение
См. также
MatrixBase::Identity()

inverse()

template<class Derived >
Quaternion< typename internal::traits< Derived >::Scalar > Eigen::QuaternionBase< Derived >::inverse
inline
Возвращает
кватернион, описывающий обратное вращение
мультипликативная обратная *this Обратите внимание, что в большинстве случаев, т.е., если вам просто нужно противоположное вращение и/или кватернион нормализован, то достаточно использовать сопряженный.
См. также
QuaternionBase::conjugate()

isApprox()

template<class Derived >
template<class OtherDerived >
bool Eigen::QuaternionBase< Derived >::isApprox ( const QuaternionBase< OtherDerived > & other,
const RealScalar & prec = NumTraits<Scalar>::dummy_precision()
) const
inline
Возвращает
значение true, если *this приблизительно равно other, с точностью, заданной prec.
См. также
MatrixBase::isApprox()

norm()

template<class Derived >
Скаляр Eigen::QuaternionBase< Derived >::norm ( ) const
inline
Возвращает
норму коэффициентов кватерниона
См. также
QuaternionBase::squaredNorm(), MatrixBase::norm()

normalize()

template<class Derived >
void Eigen::QuaternionBase< Derived >::normalize ( void )
inline

Нормализует кватернион *this

См. также
normalized(), MatrixBase::normalize()

normalized()

template<class Derived >
Quaternion<Scalar> Eigen::QuaternionBase< Derived >::normalized ( ) const
inline
Возвращает
нормализованную копию *this
См. также
normalize(), MatrixBase::normalized()

operator!=()

template<class Derived >
template<class OtherDerived >
bool Eigen::QuaternionBase< Derived >::operator!= ( const QuaternionBase< OtherDerived > & other ) const
inline
Возвращает
true, если хотя бы одна пара коэффициентов *this и other не равны друг другу.
Предупреждение
При использовании чисел с плавающей точкой, скорее всего, вам следует использовать приближённое сравнение, например, isApprox()
См. также
isApprox(), operator==

operator*()

template<class Derived >
template<class OtherDerived >
Quaternion<typename internal::traits<Derived>::Scalar> Eigen::QuaternionBase< Derived >::operator* ( const QuaternionBase< OtherDerived > & other ) const
inline
Возвращает
соединение двух вращений как произведение кватернионов

operator*=()

template<class Derived >
template<class OtherDerived >
Derived & Eigen::QuaternionBase< Derived >::operator*= ( const QuaternionBase< OtherDerived > & other )
inline
См. также
operator*(Quaternion)

operator=() [1/2]

template<class Derived >
Derived & Eigen::QuaternionBase< Derived >::operator= ( const AngleAxisType & aa )
inline

Устанавливает *this по углу и оси aa и возвращает ссылку на *this

operator=() [2/2]

template<class Derived >
template<class MatrixDerived >
Derived& Eigen::QuaternionBase< Derived >::operator= ( const MatrixBase< MatrixDerived > & xpr )
inline

Устанавливает *this по выражению xpr:

  • если xpr является 4x1 вектором, то xpr предполагается кватернионом
  • если xpr является 3x3 матрицей, то xpr предполагается матрицей вращения и xpr преобразуется в кватернион

operator==()

template<class Derived >
template<class OtherDerived >
bool Eigen::QuaternionBase< Derived >::operator== ( const QuaternionBase< OtherDerived > & other ) const
inline
Возвращает
true, если каждый коэффициент *this и other точно равен.
Предупреждение
При использовании чисел с плавающей точкой, скорее всего, вам следует использовать приближённое сравнение, например, isApprox()
См. также
isApprox(), operator!=

setFromTwoVectors()

template<class Derived >
template<typename Derived1 , typename Derived2 >
Derived & Eigen::QuaternionBase< Derived >::setFromTwoVectors ( const MatrixBase< Derived1 > & a,
const MatrixBase< Derived2 > & b
)
inline
Возвращает
кватернион, который преобразует a в b посредством вращения

Устанавливает *this в кватернион, представляющий вращение между двумя произвольными векторами a и b. Другими словами, построенное вращение представляет собой вращение, посылающее линию направления a к линии направления b, обе линии проходят через начало координат.

Возвращает
ссылку на *this.

Обратите внимание, что вводимые векторы не обязательно должны быть нормализованы и не обязательно должны иметь одинаковую норму.

setIdentity()

template<class Derived >
QuaternionBase& Eigen::QuaternionBase< Derived >::setIdentity ( )
inline
См. также
QuaternionBase::Identity(), MatrixBase::setIdentity()

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
Возвращает
сферическую линейную интерполяцию между двумя кватернионами *this и other в параметре t в [0;1].

Это представляет интерполяцию для постоянного движения между *this и other, см. также http://en.wikipedia.org/wiki/Slerp.

squaredNorm()

template<class Derived >
Скаляр Eigen::QuaternionBase< Derived >::squaredNorm ( ) const
inline
Возвращает
квадрат нормы коэффициентов кватерниона
См. также
QuaternionBase::norm(), MatrixBase::squaredNorm()

toRotationMatrix()

шаблон<класс Derived >
QuaternionBase< Derived >::Matrix3 Eigen::QuaternionBase< Derived >::toRotationMatrix ( void ) const
inline
Возвращает
эквивалентную 3x3 матрицу вращения

Преобразует кватернион в 3x3 матрицу вращения. Кватернион должен быть нормирован, в противном случае результат не определен.

vec() [1/2]

шаблон<класс Derived >
VectorBlock<Coefficients,3> Eigen::QuaternionBase< Derived >::vec ( )
inline
Возвращает
векторное выражение мнимой части (x,y,z)

vec() [2/2]

шаблон<класс Derived >
const VectorBlock<const Coefficients,3> Eigen::QuaternionBase< Derived >::vec ( ) const
inline
Возвращает
только для чтения векторное выражение мнимой части (x,y,z)

w() [1/2]

шаблон<класс Derived >
NonConstCoeffReturnType Eigen::QuaternionBase< Derived >::w ( )
inline
Возвращает
ссылку на коэффициент w (если Derived — неконстантное левостороннее значение)

w() [2/2]

шаблон<класс Derived >
CoeffReturnType Eigen::QuaternionBase< Derived >::w ( ) const
inline
Возвращает
коэффициент w

x() [1/2]

шаблон<класс Derived >
NonConstCoeffReturnType Eigen::QuaternionBase< Derived >::x ( )
inline
Возвращает
ссылку на коэффициент x (если Derived — неконстантное левостороннее значение)

x() [2/2]

шаблон<класс Derived >
CoeffReturnType Eigen::QuaternionBase< Derived >::x ( ) const
inline
Возвращает
коэффициент x

y() [1/2]

шаблон<класс Derived >
NonConstCoeffReturnType Eigen::QuaternionBase< Derived >::y ( )
inline
Возвращает
ссылку на коэффициент y (если Derived — неконстантное левостороннее значение)

y() [2/2]

шаблон<класс Derived >
CoeffReturnType Eigen::QuaternionBase< Derived >::y ( ) const
inline
Возвращает
коэффициент y

z() [1/2]

шаблон<класс Derived >
NonConstCoeffReturnType Eigen::QuaternionBase< Derived >::z ( )
inline
Возвращает
ссылку на коэффициент z (если Derived — неконстантное левостороннее значение)

z() [2/2]

шаблон<класс Derived >
CoeffReturnType Eigen::QuaternionBase< Derived >::z ( ) const
inline
Возвращает
коэффициент z

Документация для этого класса была сгенерирована из следующего файла:
  • Quaternion.h

© Eigen.
Licensed under the MPL2 License.
https://eigen.tuxfamily.org/dox/classEigen_1_1QuaternionBase.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API