|
Ocean
|
This class implements a 4x4 homogeneous transformation matrix using floating point values with the precision specified by type T. More...
#include <HomogenousMatrix4.h>
Public Types | |
| typedef T | Type |
| Definition of the used data type. | |
Public Member Functions | |
| HomogenousMatrixT4 () | |
| Creates a new default HomogenousMatrixT4 object with undefined elements. | |
| HomogenousMatrixT4 (const HomogenousMatrixT4< T > &matrix) | |
| Copy constructor. | |
| template<typename U > | |
| HomogenousMatrixT4 (const HomogenousMatrixT4< U > &matrix) | |
| Copy constructor for a matrix with difference element data type than T. | |
| HomogenousMatrixT4 (const bool setToIdentity) | |
| Creates a new HomogenousMatrixT4. | |
| template<typename U > | |
| HomogenousMatrixT4 (const U *arrayValues) | |
| Creates a new HomogenousMatrixT4 object by 16 given floating point values of type U. | |
| HomogenousMatrixT4 (const T *arrayValues) | |
| Creates a new HomogenousMatrixT4 object by 16 given floating point values. | |
| template<typename U > | |
| HomogenousMatrixT4 (const U *arrayValues, const bool valuesRowAligned) | |
| Creates a new HomogenousMatrixT4 object by an array of at least sixteen elements of float type U. | |
| HomogenousMatrixT4 (const T *arrayValues, const bool valuesRowAligned) | |
| Creates a new HomogenousMatrixT4 object by an array of at least sixteen elements. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation) | |
| Creates a new HomogenousMatrixT4 object with only a translation. | |
| HomogenousMatrixT4 (const RotationT< T > &rotation) | |
| Creates a new HomogenousMatrixT4 object with only a rotation. | |
| HomogenousMatrixT4 (const EulerT< T > &euler) | |
| Creates a new HomogenousMatrixT4 object with only a rotation given as Euler rotation. | |
| HomogenousMatrixT4 (const QuaternionT< T > &rotation) | |
| Creates a new HomogenousMatrixT4 object with only a rotation given as quaternion. | |
| HomogenousMatrixT4 (const SquareMatrixT3< T > &rotation) | |
| Creates a new HomogenousMatrixT4 object with only a rotation given as 3x3 rotation matrix. | |
| HomogenousMatrixT4 (const SquareMatrixT4< T > &matrix) | |
| Creates a new HomogenousMatrixT4 object from a 4x4 square matrix. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const RotationT< T > &rotation) | |
| Creates a new HomogenousMatrixT4 object with a translation and rotation. | |
| HomogenousMatrixT4 (const std::pair< VectorT3< T >, RotationT< T > > &translationAndRotation) | |
| Creates a new HomogenousMatrixT4 object with a translation and rotation. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const EulerT< T > &euler) | |
| Creates a new HomogenousMatrixT4 object with a translation and rotation. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const QuaternionT< T > &rotation) | |
| Creates a new HomogenousMatrixT4 object with a translation and rotation. | |
| HomogenousMatrixT4 (const std::pair< VectorT3< T >, QuaternionT< T > > &translationAndRotation) | |
| Creates a new HomogenousMatrixT4 object with a translation and rotation. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const SquareMatrixT3< T > &rotation) | |
| Creates a new HomogenousMatrixT4 object with a translation and rotation matrix. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const VectorT3< T > &scale) | |
| Creates a new HomogenousMatrixT4 object by a translation and a scale. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const RotationT< T > &rotation, const VectorT3< T > &scale) | |
| Creates a new HomogenousMatrixT4 object by a translation, rotation and scale. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const QuaternionT< T > &rotation, const VectorT3< T > &scale, const VectorT3< T > &shear) | |
| Creates a new HomogenousMatrixT4 object by a translation, rotation, scale and shear. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const RotationT< T > &rotation, const VectorT3< T > &scale, const VectorT3< T > &shear) | |
| Creates a new HomogenousMatrixT4 object by a translation, rotation, scale and shear. | |
| HomogenousMatrixT4 (const VectorT3< T > &translation, const QuaternionT< T > &rotation, const VectorT3< T > &scale) | |
| Creates a new HomogenousMatrixT4 object by a translation, rotation and scale. | |
| HomogenousMatrixT4 (const VectorT3< T > &xAxis, const VectorT3< T > &yAxis, const VectorT3< T > &zAxis) | |
| Creates a new HomogenousMatrixT4 object by three basis vectors. | |
| HomogenousMatrixT4 (const VectorT3< T > &xAxis, const VectorT3< T > &yAxis, const VectorT3< T > &zAxis, const VectorT3< T > &translation) | |
| Creates a new HomogenousMatrixT4 object by three basis vectors and a translation vector. | |
| VectorT3< T > | xAxis () const |
| Returns the x-axis of the transformation which is the first vector of the upper left 3x3 rotation matrix of this homogeneous 4x4 transformation. | |
| VectorT3< T > | yAxis () const |
| Returns the y-axis of the transformation which is the second vector of the upper left 3x3 rotation matrix of this homogeneous 4x4 transformation. | |
| VectorT3< T > | zAxis () const |
| Returns the z-axis of the transformation which is the first vector of the upper left 3x3 rotation matrix of this homogeneous 4x4 transformation. | |
| VectorT3< T > | translation () const |
| Returns the translation of the transformation. | |
| QuaternionT< T > | rotation () const |
| Returns the rotation of the transformation as quaternion. | |
| VectorT3< T > | scale () const |
| Returns the scale of the transformation. | |
| bool | decompose (VectorT3< T > &translation, QuaternionT< T > &rotation, VectorT3< T > &scale, VectorT3< T > &shear) const |
| Decomposes the transformation matrix into translation, rotation, scale and shear parameters. | |
| SquareMatrixT3< T > | rotationMatrix () const |
| Returns the rotation matrix of the transformation. | |
| void | rotationMatrix (T *data, const bool transposed=false) const |
| Copies the 3x3 rotation matrix elements of the 4x4 transformation. | |
| SquareMatrixT3< T > | orthonormalRotationMatrix () const |
| Returns the 3x3 orthonormal rotation matrix of the 4x4 transformation (by forcing a orthogonal and normalized rotation matrix). | |
| SquareMatrixT4< T > | transposed () const |
| Returns the transposed of this matrix. | |
| HomogenousMatrixT4< T > | inverted () const noexcept |
| Returns the inverted of this matrix. | |
| bool | invert () |
| Inverts the matrix. | |
| bool | invert (HomogenousMatrixT4< T > &invertedMatrix) const |
| Inverts the matrix and returns the result as parameter. | |
| T | determinant () const |
| Returns the determinant of the matrix. | |
| T | trace () const |
| Returns the trace of the matrix which is the sum of the diagonal elements. | |
| HomogenousMatrixT4< T > & | setTranslation (const VectorT3< T > &translation) |
| Sets the translation of this transformation. | |
| HomogenousMatrixT4< T > & | setRotation (const RotationT< T > &rotation) |
| Sets the rotation of this transformation. | |
| HomogenousMatrixT4< T > & | setRotation (const QuaternionT< T > &quaternion) |
| Sets the rotation of this transformation. | |
| HomogenousMatrixT4< T > & | setRotation (const SquareMatrixT3< T > &matrix) |
| Sets the rotation of this transformation. | |
| HomogenousMatrixT4< T > & | applyScale (const VectorT3< T > &scale) |
| Applies new scale values. | |
| void | toIdentity () |
| Sets the matrix to the identity matrix. | |
| void | toNull () |
| Sets the matrix to a zero matrix (including the lower right element). | |
| bool | isValid () const |
| Returns whether this matrix is a valid homogeneous transformation. | |
| bool | isIdentity () const |
| Returns whether this matrix is an identity matrix. | |
| bool | isEqual (const HomogenousMatrixT4< T > &matrix, const T epsilon=NumericT< T >::eps()) const |
| Returns whether two matrices are almost identical up to a specified epsilon. | |
| bool | isNull () const |
| Returns whether this matrix is a zero matrix (with all elements equal to zero). | |
| const T * | data () const |
| Returns a pointer to the internal values. | |
| T * | data () |
| Returns a pointer to the internal values. | |
| void | copyElements (T *arrayValues, const bool valuesRowAligned=false) const |
| Copies the elements of this matrix to an array with floating point values of the same type T. | |
| template<typename U > | |
| void | copyElements (U *arrayValues, const bool valuesRowAligned=false) const |
| Copies the elements of this matrix to an array with floating point values of the type U. | |
| VectorT3< T > | rotationMatrix (const VectorT3< T > &vector) const |
| Transforms a 3D vector by application of only the inner rotation matrix (including scale and shearing) of this transformation. | |
| VectorT3< T > | transposedRotationMatrix (const VectorT3< T > &vector) const |
| Transforms a 3D vector by application of only the inner transposed rotation matrix (including scale and shearing) of this transformation. | |
| HomogenousMatrixT4< T > & | operator= (const HomogenousMatrixT4< T > &)=default |
| Default copy assignment operator. | |
| bool | operator== (const HomogenousMatrixT4< T > &matrix) const |
| Returns whether two transformations are identical up to a small epsilon. | |
| bool | operator!= (const HomogenousMatrixT4< T > &matrix) const |
| Returns whether two transformations are not identical up to a small epsilon. | |
| HomogenousMatrixT4< T > | operator* (const HomogenousMatrixT4< T > &matrix) const |
| Combines two transformation matrices. | |
| HomogenousMatrixT4< T > & | operator*= (const HomogenousMatrixT4< T > &matrix) |
| Combines and assigns two transformation matrices. | |
| HomogenousMatrixT4< T > | operator* (const RotationT< T > &rotation) const |
| Combines a transformation with a rotation. | |
| HomogenousMatrixT4< T > & | operator*= (const RotationT< T > &rotation) |
| Combines and assigns a transformation with a rotation. | |
| HomogenousMatrixT4< T > | operator* (const QuaternionT< T > &rotation) const |
| Combines a transformation with a quaternion rotation. | |
| HomogenousMatrixT4< T > & | operator*= (const QuaternionT< T > &rotation) |
| Combines and assigns a transformation with a quaternion rotation. | |
| VectorT3< T > | operator* (const VectorT3< T > &vector) const |
| Transforms a 3D vector. | |
| VectorT4< T > | operator* (const VectorT4< T > &vector) const |
| Transforms a 4D vector. | |
| T | operator[] (const unsigned int index) const |
| Element operator. | |
| T & | operator[] (const unsigned int index) |
| Element operator. | |
| T | operator() (const unsigned int row, const unsigned int column) const |
| Element operator. | |
| T & | operator() (const unsigned int row, const unsigned int column) |
| Element operator. | |
| T | operator() (const unsigned int index) const |
| Element operator. | |
| T & | operator() (const unsigned int index) |
| Element operator. | |
| const T * | operator() () const |
| Access operator. | |
| T * | operator() () |
| Access operator. | |
| size_t | operator() (const HomogenousMatrixT4< T > &matrix) const |
| Hash function. | |
| std::vector< HomogenousMatrixT4< float > > | matrices2matrices (const std::vector< HomogenousMatrixT4< float > > &matrices) |
| std::vector< HomogenousMatrixT4< double > > | matrices2matrices (const std::vector< HomogenousMatrixT4< double > > &matrices) |
Static Public Member Functions | |
| template<typename U > | |
| static std::vector< HomogenousMatrixT4< T > > | matrices2matrices (const std::vector< HomogenousMatrixT4< U > > &matrices) |
| Converts matrices with specific data type to matrices with different data type. | |
| template<typename U > | |
| static std::vector< HomogenousMatrixT4< T > > | matrices2matrices (const HomogenousMatrixT4< U > *matrices, const size_t size) |
| Converts matrices with specific data type to matrices with different data type. | |
Protected Attributes | |
| T | values_ [16] |
| The sixteen values of the transformation matrix. | |
Friends | |
| template<typename U > | |
| class | HomogenousMatrixT4 |
This class implements a 4x4 homogeneous transformation matrix using floating point values with the precision specified by type T.
The values are stored in a column major/aligned order with indices: | 0 4 8 12 | | 1 5 9 13 | | 2 6 10 14 | | 3 7 11 15 | This matrix allows homogeneous transformations only. With basis vectors (rx1, ry1, rz1), (rx2, ry2, rz2), (rx3, ry3, rz3), and translation vector (tx, ty, tz): | rx1 rx2 rx3 tx | | ry1 ry2 ry3 ty | | rz1 rz2 rz3 tz | | 0 0 0 1 |
| T | Data type of matrix elements |
| typedef T Ocean::HomogenousMatrixT4< T >::Type |
Definition of the used data type.
|
inline |
Creates a new default HomogenousMatrixT4 object with undefined elements.
Beware: This matrix is neither a zero nor an entity matrix!
|
inline |
Copy constructor.
| matrix | The matrix to copy |
|
inlineexplicit |
Copy constructor for a matrix with difference element data type than T.
| matrix | The matrix to copy |
| U | The element data type of the second matrix |
|
inlineexplicit |
Creates a new HomogenousMatrixT4.
Beware: The zero matrix will hold a zero in the lower right corner which must be set explicitly later to create a valid matrix.
Only constructors explicitly set the lower right value to 1 like e.g., the constructor building a matrix from a rotation or translation and so on.
| setToIdentity | True, to create a identity matrix; False, to set a zero matrix |
|
explicit |
Creates a new HomogenousMatrixT4 object by 16 given floating point values of type U.
| arrayValues | The array with 16 matrix elements of type U |
|
explicit |
Creates a new HomogenousMatrixT4 object by 16 given floating point values.
| arrayValues | The array with 16 matrix elements |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const U * | arrayValues, |
| const bool | valuesRowAligned | ||
| ) |
Creates a new HomogenousMatrixT4 object by an array of at least sixteen elements of float type U.
| arrayValues | The sixteen matrix elements defining the new matrix, must be valid |
| valuesRowAligned | True, if the given values are stored in a row aligned order; False, if the values are stored in a column aligned order (which is the default case for this matrix) |
| U | The floating point type of the given elements |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const T * | arrayValues, |
| const bool | valuesRowAligned | ||
| ) |
Creates a new HomogenousMatrixT4 object by an array of at least sixteen elements.
| valuesRowAligned | True, if the given values are stored in a row aligned order; False, if the values are stored in a column aligned order (which is the default case for this matrix) |
| arrayValues | The sixteen matrix elements defining the new matrix, must be valid |
|
explicit |
Creates a new HomogenousMatrixT4 object with only a translation.
| translation | The translation of the resulting transformation |
|
explicit |
Creates a new HomogenousMatrixT4 object with only a rotation.
| rotation | The angle-axis rotation of the resulting transformation |
|
explicit |
Creates a new HomogenousMatrixT4 object with only a rotation given as Euler rotation.
| euler | The euler rotation of the resulting transformation |
|
explicit |
Creates a new HomogenousMatrixT4 object with only a rotation given as quaternion.
| rotation | The rotation of the resulting transformation |
|
explicit |
Creates a new HomogenousMatrixT4 object with only a rotation given as 3x3 rotation matrix.
| rotation | 3x3 rotation matrix |
|
explicit |
Creates a new HomogenousMatrixT4 object from a 4x4 square matrix.
| matrix | The 4x4 square matrix |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const RotationT< T > & | rotation | ||
| ) |
Creates a new HomogenousMatrixT4 object with a translation and rotation.
The resulting transformation can be written as the following matrix multiplication:
HomogenousMatrix4(translation, rotation) == HomogenousMatrix4(translation) * HomogenousMatrix4(rotation)
| translation | The translation of the resulting transformation |
| rotation | The rotation of the resulting transformation, must be valid |
|
explicit |
Creates a new HomogenousMatrixT4 object with a translation and rotation.
| translationAndRotation | The pair of translation and rotation of the resulting transformation |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const EulerT< T > & | euler | ||
| ) |
Creates a new HomogenousMatrixT4 object with a translation and rotation.
The resulting transformation can be written as the following matrix multiplication:
HomogenousMatrix4(translation, euler) == HomogenousMatrix4(translation) * HomogenousMatrix4(euler)
| translation | The translation of the resulting transformation |
| euler | The euler rotation of the resulting transformation, must be valid |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const QuaternionT< T > & | rotation | ||
| ) |
Creates a new HomogenousMatrixT4 object with a translation and rotation.
The resulting transformation can be written as the following matrix multiplication:
HomogenousMatrix4(translation, rotation) == HomogenousMatrix4(translation) * HomogenousMatrix4(rotation)
| translation | The translation of the resulting transformation |
| rotation | The quaternion rotation of the resulting transformation, must be valid |
|
explicit |
Creates a new HomogenousMatrixT4 object with a translation and rotation.
| translationAndRotation | The pair of translation and rotation of the resulting transformation |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const SquareMatrixT3< T > & | rotation | ||
| ) |
Creates a new HomogenousMatrixT4 object with a translation and rotation matrix.
The resulting transformation can be written as the following matrix multiplication:
HomogenousMatrix4(translation, rotation) == HomogenousMatrix4(translation) * HomogenousMatrix4(rotation)
| translation | The translation of the resulting transformation |
| rotation | The rotation matrix of the resulting transformation, must be valid |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const VectorT3< T > & | scale | ||
| ) |
Creates a new HomogenousMatrixT4 object by a translation and a scale.
| translation | The translation of the resulting transformation |
| scale | The scale of the resulting transformation |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const RotationT< T > & | rotation, | ||
| const VectorT3< T > & | scale | ||
| ) |
Creates a new HomogenousMatrixT4 object by a translation, rotation and scale.
| translation | The translation of the resulting transformation |
| rotation | The rotation of the resulting transformation, must be valid |
| scale | The scale of the resulting transformation |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const QuaternionT< T > & | rotation, | ||
| const VectorT3< T > & | scale, | ||
| const VectorT3< T > & | shear | ||
| ) |
Creates a new HomogenousMatrixT4 object by a translation, rotation, scale and shear.
| translation | The translation of the resulting transformation |
| rotation | The rotation of the resulting transformation as unit quaternion, must be valid |
| scale | The scale of the resulting transformation |
| shear | The shear of the resulting transformation with order (xy, xz, yz) |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const RotationT< T > & | rotation, | ||
| const VectorT3< T > & | scale, | ||
| const VectorT3< T > & | shear | ||
| ) |
Creates a new HomogenousMatrixT4 object by a translation, rotation, scale and shear.
| translation | The translation of the resulting transformation |
| rotation | The rotation of the resulting transformation, must be valid |
| scale | The scale of the resulting transformation |
| shear | The shear of the resulting transformation with order (xy, xz, yz) |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | translation, |
| const QuaternionT< T > & | rotation, | ||
| const VectorT3< T > & | scale | ||
| ) |
Creates a new HomogenousMatrixT4 object by a translation, rotation and scale.
| translation | The translation of the resulting transformation |
| rotation | The quaternion rotation of the resulting transformation, must be valid |
| scale | The scale of the resulting transformation |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | xAxis, |
| const VectorT3< T > & | yAxis, | ||
| const VectorT3< T > & | zAxis | ||
| ) |
Creates a new HomogenousMatrixT4 object by three basis vectors.
| xAxis | First basis vector |
| yAxis | Second basis vector |
| zAxis | Third basis vector |
| Ocean::HomogenousMatrixT4< T >::HomogenousMatrixT4 | ( | const VectorT3< T > & | xAxis, |
| const VectorT3< T > & | yAxis, | ||
| const VectorT3< T > & | zAxis, | ||
| const VectorT3< T > & | translation | ||
| ) |
Creates a new HomogenousMatrixT4 object by three basis vectors and a translation vector.
| xAxis | First basis vector |
| yAxis | Second basis vector |
| zAxis | Third basis vector |
| translation | The translation vector |
| HomogenousMatrixT4< T > & Ocean::HomogenousMatrixT4< T >::applyScale | ( | const VectorT3< T > & | scale | ) |
Applies new scale values.
| scale | The new scale values which are applied to the inner 3x3 rotation matrix |
|
inline |
Copies the elements of this matrix to an array with floating point values of the same type T.
| arrayValues | Array with 16 floating point values of type T receiving the elements of this matrix, must be valid |
| valuesRowAligned | True, if the target values are stored in a row aligned order; False, if the values are stored in a column aligned order (which is the default case for this matrix) |
|
inline |
Copies the elements of this matrix to an array with floating point values of the type U.
| arrayValues | Array with 16 floating point values of type U receiving the elements of this matrix, must be valid |
| valuesRowAligned | True, if the target values are stored in a row aligned order; False, if the values are stored in a column aligned order (which is the default case for this matrix) |
|
inline |
Returns a pointer to the internal values.
|
inline |
Returns a pointer to the internal values.
| bool Ocean::HomogenousMatrixT4< T >::decompose | ( | VectorT3< T > & | translation, |
| QuaternionT< T > & | rotation, | ||
| VectorT3< T > & | scale, | ||
| VectorT3< T > & | shear | ||
| ) | const |
Decomposes the transformation matrix into translation, rotation, scale and shear parameters.
| translation | The returning translation parameter |
| rotation | The returning rotation parameter as quaternion |
| scale | The returning scale parameter |
| shear | The returning shear parameter with order (xy, xz, yz) |
| T Ocean::HomogenousMatrixT4< T >::determinant | ( | ) | const |
Returns the determinant of the matrix.
| bool Ocean::HomogenousMatrixT4< T >::invert | ( | ) |
Inverts the matrix.
| bool Ocean::HomogenousMatrixT4< T >::invert | ( | HomogenousMatrixT4< T > & | invertedMatrix | ) | const |
Inverts the matrix and returns the result as parameter.
| invertedMatrix | The resulting inverted matrix |
|
noexcept |
Returns the inverted of this matrix.
This matrix must not be singular, ensure that the matrix is invertible before calling this function.
Even better: avoid the usage of this function and call invert() instead.
In case, this matrix is not invertible, this matrix will be returned instead.
|
inline |
Returns whether two matrices are almost identical up to a specified epsilon.
| matrix | Second matrix that will be checked |
| epsilon | The epsilon threshold to be used, with range [0, infinity) |
| bool Ocean::HomogenousMatrixT4< T >::isIdentity | ( | ) | const |
| bool Ocean::HomogenousMatrixT4< T >::isNull | ( | ) | const |
Returns whether this matrix is a zero matrix (with all elements equal to zero).
| bool Ocean::HomogenousMatrixT4< T >::isValid | ( | ) | const |
Returns whether this matrix is a valid homogeneous transformation.
|
inlinestatic |
Converts matrices with specific data type to matrices with different data type.
| matrices | The matrices to convert |
| size | The number of matrices to convert |
| U | The element data type of the matrices to convert |
|
inline |
|
inline |
|
inlinestatic |
Converts matrices with specific data type to matrices with different data type.
| matrices | The matrices to convert |
| U | The element data type of the matrices to convert |
|
inline |
Returns whether two transformations are not identical up to a small epsilon.
| matrix | Right operand |
|
inline |
Access operator.
|
inline |
Access operator.
|
inline |
Hash function.
| matrix | The matrix for which the hash value will be determined |
|
inline |
Element operator.
| index | The index of the element to return [0, 15] |
|
inline |
Element operator.
| index | The index of the element to return [0, 15] |
|
inline |
Element operator.
| row | The row of the element to return [0, 3] |
| column | The column of the element to return [0, 3] |
|
inline |
Element operator.
| row | The row of the element to return [0, 3] |
| column | The column of the element to return [0, 3] |
| HomogenousMatrixT4< T > Ocean::HomogenousMatrixT4< T >::operator* | ( | const HomogenousMatrixT4< T > & | matrix | ) | const |
Combines two transformation matrices.
| matrix | Right transformation matrix |
| HomogenousMatrixT4< T > Ocean::HomogenousMatrixT4< T >::operator* | ( | const QuaternionT< T > & | rotation | ) | const |
Combines a transformation with a quaternion rotation.
| rotation | The quaternion rotation to combine, must be valid |
| HomogenousMatrixT4< T > Ocean::HomogenousMatrixT4< T >::operator* | ( | const RotationT< T > & | rotation | ) | const |
Combines a transformation with a rotation.
| rotation | The rotation to combine, must be valid |
|
inline |
Transforms a 3D vector.
The vector will be extended with a 1.0 as fourth element and de-homogenized afterwards.
| vector | The vector to transform |
|
inline |
Transforms a 4D vector.
| vector | The vector to transform |
|
inline |
Combines and assigns two transformation matrices.
| matrix | Right transformation matrix |
|
inline |
Combines and assigns a transformation with a quaternion rotation.
| rotation | The quaternion rotation to combine, must be valid |
|
inline |
Combines and assigns a transformation with a rotation.
| rotation | The rotation to combine, must be valid |
|
default |
Default copy assignment operator.
| bool Ocean::HomogenousMatrixT4< T >::operator== | ( | const HomogenousMatrixT4< T > & | matrix | ) | const |
Returns whether two transformations are identical up to a small epsilon.
| matrix | Right operand |
|
inline |
Element operator.
| index | The index of the element to return [0, 15] |
|
inline |
Element operator.
| index | The index of the element to return [0, 15] |
| SquareMatrixT3< T > Ocean::HomogenousMatrixT4< T >::orthonormalRotationMatrix | ( | ) | const |
Returns the 3x3 orthonormal rotation matrix of the 4x4 transformation (by forcing a orthogonal and normalized rotation matrix).
All vectors of the resulting rotation matrix have unit length.
| QuaternionT< T > Ocean::HomogenousMatrixT4< T >::rotation | ( | ) | const |
Returns the rotation of the transformation as quaternion.
|
inline |
Returns the rotation matrix of the transformation.
|
inline |
Transforms a 3D vector by application of only the inner rotation matrix (including scale and shearing) of this transformation.
| vector | The vector to be transformed |
|
inline |
Copies the 3x3 rotation matrix elements of the 4x4 transformation.
| data | The buffer receiving the nine rotation matrix elements, must be valid |
| transposed | True, to copy the transposed rotation matrix (to copy the array into a row major buffer); False, to copy the matrix into a column major buffer |
| VectorT3< T > Ocean::HomogenousMatrixT4< T >::scale | ( | ) | const |
Returns the scale of the transformation.
| HomogenousMatrixT4< T > & Ocean::HomogenousMatrixT4< T >::setRotation | ( | const QuaternionT< T > & | quaternion | ) |
Sets the rotation of this transformation.
| quaternion | The quaternion rotation to set, must be valid |
| HomogenousMatrixT4< T > & Ocean::HomogenousMatrixT4< T >::setRotation | ( | const RotationT< T > & | rotation | ) |
Sets the rotation of this transformation.
| rotation | The rotation to set, must be valid |
| HomogenousMatrixT4< T > & Ocean::HomogenousMatrixT4< T >::setRotation | ( | const SquareMatrixT3< T > & | matrix | ) |
Sets the rotation of this transformation.
| matrix | The 3x3 rotation matrix to set |
|
inline |
Sets the translation of this transformation.
| translation | The translation to set |
|
inline |
Sets the matrix to the identity matrix.
|
inline |
Sets the matrix to a zero matrix (including the lower right element).
|
inline |
Returns the trace of the matrix which is the sum of the diagonal elements.
|
inline |
Returns the translation of the transformation.
| SquareMatrixT4< T > Ocean::HomogenousMatrixT4< T >::transposed | ( | ) | const |
Returns the transposed of this matrix.
|
inline |
Transforms a 3D vector by application of only the inner transposed rotation matrix (including scale and shearing) of this transformation.
| vector | The vector to be transformed |
|
inline |
Returns the x-axis of the transformation which is the first vector of the upper left 3x3 rotation matrix of this homogeneous 4x4 transformation.
|
inline |
Returns the y-axis of the transformation which is the second vector of the upper left 3x3 rotation matrix of this homogeneous 4x4 transformation.
|
inline |
Returns the z-axis of the transformation which is the first vector of the upper left 3x3 rotation matrix of this homogeneous 4x4 transformation.
|
protected |
The sixteen values of the transformation matrix.