Structure Quaternion

Unitary quaternion for the representation of a 3d rotation.

Namespace: dsp::geo

Fields list

q : Eigen::Array4f

The 4 elements of the quaternion.

Methods list

dsp::geo::Quaternion::Quaternion(float q0=1, float q1=0, float q2=0, float q3=0)
Constructor (from the 4 elements).

dsp::geo::Quaternion::Quaternion(const Eigen::Array4f &q_)
Constructor (from the 4 elements).

dsp::geo::Quaternion::Quaternion(const Eigen::Matrix3f &R)
Constructor (from a rotation matrix).

Quaternion inv() const
Inverse rotation.

Eigen::Matrix4f dsp::geo::Quaternion::mat() const
Rotation matrix in homogeneous coordinates.

Eigen::Vector3f dsp::geo::Quaternion::rotate(const Eigen::Vector3f &x) const
Apply a rotation.

Eigen::Matrix3f dsp::geo::Quaternion::rot_mat() const
Computes the rotation matrix.