|
The blo Library
|
Quaternion representation of 3D rotation. More...
#include <Quaternion3D.h>
Public Member Functions | |
| Quaternion3D ()=default | |
| Default constructor. | |
| Quaternion3D (const T &a, const T &b, const T &c, const T &d) | |
| Constructs quaternion representation of 3D rotation. | |
| Quaternion3D (const T &theta, const SmallMatrix< T, 3, 1 > &v) | |
| Constructs quaternion representation of 3D rotation from rotation angle and axis that rotation is about. | |
| Quaternion3D (const Quaternion3D< T > &rhs)=default | |
| Copy constructor. | |
| virtual | ~Quaternion3D ()=default |
| Destructor. | |
| Quaternion3D< T > & | operator= (const Quaternion3D< T > &rhs)=default |
| Assignment operator. | |
| void | set (const T &theta, const SmallMatrix< T, 3, 1 > &v) |
| Sets quaternion representation of 3D rotation from rotation angle and axis that rotation is about. | |
| void | coords (T &a, T &b, T &c, T &d) const |
| Retrieves quaternion coordinates. | |
| void | setCoords (const T &a, const T &b, const T &c, const T &d) |
| Sets quaternion coordinates. | |
| T & | a () |
| First coordinate of quaternion. | |
| const T & | a () const |
| First coordinate of quaternion. | |
| T & | b () |
| Second coordinate of quaternion. | |
| const T & | b () const |
| Second coordinate of quaternion. | |
| T & | c () |
| Third coordinate of quaternion. | |
| const T & | c () const |
| Third coordinate of quaternion. | |
| T & | d () |
| Fourth coordinate of quaternion. | |
| const T & | d () const |
| Fourth coordinate of quaternion. | |
| Quaternion3D< T > & | operator+= (const Quaternion3D< T > &rhs) |
| Quaternion3D< T > & | operator*= (const Quaternion3D< T > &rhs) |
| Quaternion3D< T > & | operator*= (const T &s) |
Public Member Functions inherited from blo::HomgArray1DFixed< T, 4 > | |
| HomgArray1DFixed ()=default | |
| Default constructor. | |
| HomgArray1DFixed (const HomgArray1DFixed< T, N > &rhs)=default | |
| Copy constructor. | |
| virtual | ~HomgArray1DFixed ()=default |
| Destructor. | |
| HomgArray1DFixed< T, N > & | operator= (const HomgArray1DFixed< T, N > &rhs)=default |
| Assignment operator. | |
Public Member Functions inherited from blo::Array1DFixed< T, N > | |
| Array1DFixed ()=default | |
| Default constructor. | |
| Array1DFixed (const T &val) | |
| Constructs array of specified value. | |
| Array1DFixed (const std::initializer_list< T > &list) | |
| Constructs array that is a copy of specified initializer list. | |
| Array1DFixed (const Array1DFixed< T, N > &rhs)=default | |
| Copy constructor. | |
| virtual | ~Array1DFixed ()=default |
| Destructor. | |
| Array1DFixed< T, N > & | operator= (const Array1DFixed< T, N > &rhs)=default |
| Copy assignment operator. | |
| T & | operator[] (int n) |
| Index array element. | |
| const T & | operator[] (int n) const |
| Index array element. | |
| T * | ptrData () |
| Retrieves the pointer to the beginning of the array. | |
| const T * | ptrData () const |
| Retrieves the pointer to the beginning of the array. | |
| void | set (const T &val) |
| Sets array elements to a value. | |
Additional Inherited Members | |
Static Public Member Functions inherited from blo::Array1DFixed< T, N > | |
| static int | size () |
| Number of elements in the array. | |
| static int | len () |
| Length of the array. | |
| static int | stride2 () |
| Stride in bytes between the elements in the array. | |
Quaternion representation of 3D rotation.
a + b * i + c * j + d * k, where i^2 = j^2 = k^2 = i * j * k = -1, i * j = k, j * k = i, and k * i = j.
| T | Data type. |
|
default |
Default constructor.
| blo::Quaternion3D< T >::Quaternion3D | ( | const T & | a, |
| const T & | b, | ||
| const T & | c, | ||
| const T & | d | ||
| ) |
Constructs quaternion representation of 3D rotation.
quaternion = (a, b, c, d)^T
| a | First coordinate of quaternion. |
| b | Second coordinate of quaternion. |
| c | Third coordinate of quaternion. |
| d | Fourth coordinate of quaternion. |
| blo::Quaternion3D< T >::Quaternion3D | ( | const T & | theta, |
| const SmallMatrix< T, 3, 1 > & | v | ||
| ) |
Constructs quaternion representation of 3D rotation from rotation angle and axis that rotation is about.
Rotation through an angle theta about the axis represented by the vector v.
| theta | Angle of rotation in radians. |
| v | Vector representing the axis of rotation. |
|
default |
Copy constructor.
|
virtualdefault |
Destructor.
| T & blo::Quaternion3D< T >::a | ( | ) |
First coordinate of quaternion.
quaternion = (a, b, c, d)^T
| const T & blo::Quaternion3D< T >::a | ( | ) | const |
First coordinate of quaternion.
quaternion = (a, b, c, d)^T
| T & blo::Quaternion3D< T >::b | ( | ) |
Second coordinate of quaternion.
quaternion = (a, b, c, d)^T
| const T & blo::Quaternion3D< T >::b | ( | ) | const |
Second coordinate of quaternion.
quaternion = (a, b, c, d)^T
| T & blo::Quaternion3D< T >::c | ( | ) |
Third coordinate of quaternion.
quaternion = (a, b, c, d)^T
| const T & blo::Quaternion3D< T >::c | ( | ) | const |
Third coordinate of quaternion.
quaternion = (a, b, c, d)^T
| void blo::Quaternion3D< T >::coords | ( | T & | a, |
| T & | b, | ||
| T & | c, | ||
| T & | d | ||
| ) | const |
Retrieves quaternion coordinates.
quaternion = (a, b, c, d)^T
| a | First coordinate of quaternion. |
| b | Second coordinate of quaternion. |
| c | Third coordinate of quaternion. |
| d | Fourth coordinate of quaternion. |
| T & blo::Quaternion3D< T >::d | ( | ) |
Fourth coordinate of quaternion.
quaternion = (a, b, c, d)^T
| const T & blo::Quaternion3D< T >::d | ( | ) | const |
Fourth coordinate of quaternion.
quaternion = (a, b, c, d)^T
| Quaternion3D< T > & blo::Quaternion3D< T >::operator*= | ( | const Quaternion3D< T > & | rhs | ) |
| Quaternion3D< T > & blo::Quaternion3D< T >::operator*= | ( | const T & | s | ) |
| Quaternion3D< T > & blo::Quaternion3D< T >::operator+= | ( | const Quaternion3D< T > & | rhs | ) |
|
default |
Assignment operator.
| void blo::Quaternion3D< T >::set | ( | const T & | theta, |
| const SmallMatrix< T, 3, 1 > & | v | ||
| ) |
Sets quaternion representation of 3D rotation from rotation angle and axis that rotation is about.
Rotation through an angle theta about the axis represented by the vector v.
| theta | Angle of rotation in radians. |
| v | Vector representing the axis of rotation. |
| void blo::Quaternion3D< T >::setCoords | ( | const T & | a, |
| const T & | b, | ||
| const T & | c, | ||
| const T & | d | ||
| ) |
Sets quaternion coordinates.
quaternion = (a, b, c, d)^T
| a | First coordinate of quaternion. |
| b | Second coordinate of quaternion. |
| c | Third coordinate of quaternion. |
| d | Fourth coordinate of quaternion. |