![]() |
Scanframe Modular Application 0.1.0
|
Generic 4 x 4 matrix template. More...
#include <TMatrix44.h>

Classes | |
| union | data_type |
| Storage union of the 4x4 matrix as array and 4 x4 array. It is initialized as a unit-matrix. More... | |
Public Types | |
| enum | EAxis : unsigned int { axisX = 0 , axisY = 1 , axisZ = 2 , axisT = 3 } |
| Enumerate for identifying a matrix axis. More... | |
| typedef T | value_type |
| Type accessible when implemented. | |
Public Member Functions | |
| TMatrix44 ()=default | |
| Default constructor which is by default a unit-matrix. | |
| TMatrix44 (T m00, T m01, T m02, T m03, T m10, T m11, T m12, T m13, T m20, T m21, T m22, T m23, T m30, T m31, T m32, T m33) | |
| Initialization constructor for 16 single floating point values. | |
| TMatrix44 (std::initializer_list< T[4]> list) | |
| Constructor using an initializer list. | |
| TMatrix44 (const T[4][4]) | |
| Initialization constructor for 4x4 floating point values. | |
| TMatrix44 (const T *) | |
| Initialization constructor for 16 floating point values. | |
| TMatrix44 (const TVector3D< T > &v) | |
| Construct from a translation vector. Construct a translation transformation from a given 3D Vector. | |
| TMatrix44 (T tilt, T pan, T roll) | |
| Constructs a matrix from rotations for each axis. | |
| TMatrix44 (const TMatrix44 &) | |
| Copy constructor. | |
| TMatrix44 (TMatrix44 &&) noexcept | |
| Move constructor. | |
| TMatrix44 & | unit () |
| Set or resets this instance as a unit/identity matrix. A unit matrix, also known as the identity matrix, is a square matrix in which all the elements along the main diagonal (from the top-left to the bottom-right) are 1, and all other elements are 0. It acts as the multiplicative identity in matrix algebra, meaning that multiplying any matrix by the identity matrix results in the original matrix itself. | |
| T | determinant () const |
| Gets the 3x3 determinant from this instance. | |
| TMatrix44 & | invert () |
| Inverts this matrix. | |
| TMatrix44 | inverse () const |
| Gets the inverted version of this instance. Call the method invert() to do this. | |
| TMatrix44 | transposed () const |
| Get a transposed matrix of this instance. | |
| TMatrix44 & | transpose () |
| Transpose this matrix. | |
| TMatrix44 & | assign (const T[4][4]) |
| Assigns the 4x4 array structure to this matrix. | |
| TMatrix44 & | assign (const T *) |
| Assigns the 16 values from the pointer to this matrix. | |
| TMatrix44 & | transposeAssign (const T[4][4]) |
| Assigns the transposed 4x4 array structure to this matrix. | |
| TMatrix44 & | operator= (const TMatrix44 &) |
| Assignment operator. | |
| TMatrix44 & | operator= (TMatrix44 &&m) noexcept |
| Assignment move operator. | |
| TMatrix44 & | operator*= (const TMatrix44 &) |
| Applies passed matrix on the axes of this matrix. | |
| TVector3D< T > | operator^ (const TVector3D< T > &) const |
| Applies matrix on the passed 3D vector including the translation. Calls method transformed() on the passed 3D-vector excluding the translation. | |
| TVector3D< T > | operator* (const TVector3D< T > &) const |
| Applies matrix on the passed 3D vector including the translation. Calls method transformed() on the passed 3D vector with the translation included. | |
| value_type * | data () |
| Gets the pointer to the array of this matrix. | |
| const value_type * | data () const |
| Gets the pointer to the array of this matrix. | |
| operator T* () | |
| Cast operator to the pointer of type 'T'. | |
| operator const T * () const | |
| Cast operator to the pointer of type 'T'. | |
| bool | isEqual (const TMatrix44 &m, T tol=tolerance) const |
| Compares the passed matrix within the set tolerance. | |
| bool | isRotational () const |
| Determines if the matrix is a rotation matrix. | |
| bool | operator== (const TMatrix44 &) const |
| Compare equal operator using the tolerance when comparing. | |
| bool | operator!= (const TMatrix44 &) const |
| Compare unequal operator using the tolerance when comparing. | |
| void | copyTo (T[4][4], bool column_order=false) const |
| Copies the matrix to a 4x4 array in row or column order. | |
| void | copyTo (T *, bool column_order=false) const |
| Copies the matrix to a 16-element deep array in row or column order.. | |
| TMatrix44 & | setTiltPanRoll (T tilt, T pan, T roll) |
| Sets/resets rotation part of the matrix according to tilt pan roll and does not touch the translation or scaling part. | |
| void | getTiltPanRoll (T &tilt, T &pan, T &roll) const |
| Translates rotation part of matrix to tilt, pan and roll values. | |
| TMatrix44 & | rotate (T angle, const TVector3D< T > &vec, bool only=true) |
| Applies rotation on the current matrix around a vector. | |
| TMatrix44 & | rotate (T angle, T x, T y, T z, bool only=true) |
| Applies rotation on the current matrix. | |
| TMatrix44 | rotated (T angle, T x, T y, T z, bool only=true) const |
| Same as rotate() but only returns the changed matrix and does not affect this matrix. | |
| TMatrix44 | rotated (T angle, const TVector3D< T > &vec, bool only=true) const |
| Same as rotate() but only returns the changed matrix and does not affect this matrix. | |
| void | setPerspectiveProjection (T near_plane, T far_plane, T fov) |
| Sets the projection for this matrix. | |
| TMatrix44 & | multiply (const TMatrix44 &m) |
| Multiplies this matrix with the passed one so that the given matrix is applied on the matrix axes. | |
| TMatrix44 | multiplied (const TMatrix44 &m) const |
| Same as multiply() but returns the changed matrix and does not affect this matrix. | |
| TMatrix44 & | rotate (const TMatrix44 &m) |
| Multiplies this matrix only with the 3x3 part of the given matrix applying only rotation and scaling. | |
| TMatrix44 | rotated (const TMatrix44 &m) const |
| Same as rotate() but returns the changed matrix and does not affect this matrix. | |
| TVector3D< T > | transformed (const TVector3D< T > &v, bool translate) const |
| Applies the matrix rotation up on a 3D-vector. | |
| TMatrix44 & | clearTranslation () |
| Zero's or clears translation part of this instance. | |
| TMatrix44 & | translate (const TVector3D< T > &v, bool only=true) |
| Adds a translation to this instance using a 3D vector. | |
| TMatrix44 & | translate (T x, T y, T z, bool only=true) |
| Adds a translation of this instance using individual values for each axis. | |
| TMatrix44 | translated (const TVector3D< T > &v, bool only=true) const |
| Same as translate() but does not change this matrix only returns the translated one. | |
| TMatrix44 | translated (T x, T y, T z, bool only=true) const |
| Same as translate() but does not change this matrix only returns the translated one. | |
| TVector3D< T > | getTranslation () const |
| Gets translation part of matrix. | |
| TMatrix44 & | setTranslation (const TVector3D< T > &v) |
| Sets translation part of this matrix. | |
| TMatrix44 & | setTranslation (T x, T y, T z) |
| Sets translation part of this matrix. | |
| TMatrix44 & | scale (T factor, bool translation=true) |
| Multiplies this matrix by the given factor. Leave the matrix translation vector alone. | |
| TMatrix44 & | scale (T x, T y, T z, bool translation=true) |
| Multiplies this matrix by the given factors for x, y and z-axis. Leave the matrix translation vector alone. | |
| TMatrix44 & | scale (TVector3D< T > factor, bool translation=true) |
| Multiplies this matrix by the given factors for x, y and z-axis. Leave the matrix translation vector alone. | |
| TVector3D< T > | getAxis (EAxis axis) const |
| Gets the given axis of matrix as a 3D vector. | |
| TMatrix44 | orbit (T horizontal, T vertical) const |
| Gets transformation of rotation around the local x- and y-axis of the current matrix. | |
| TMatrix44 | orientation () const |
| Gets the orientation part of matrix. | |
| void | setElement (unsigned int row, unsigned int column, T value) |
| Sets the element specified by the row and column. | |
| T | element (unsigned int row, unsigned int column) const |
| Gets the element specified by the row and column. | |
| T & | element (unsigned int row, unsigned int column) |
| Gets the element reference specified by the row and column. | |
| T & | operator() (int row, int column) |
| Function operator for row column value manipulations. This is different from the element() method. | |
| T | operator() (int row, int column) const |
| Gets the element from row and column index. This is different from the element() method. | |
| template<typename R > | |
| void | toOpenGL (R *matrix) const |
| Copies this matrix to a column-major matrix array compatible with OpenGL standard. A one-on-one copy is not possible, and a transpose of the 3x3 matrix part within is needed. | |
| template<typename R > | |
| std::array< R, 16 > | toOpenGL () const |
| Gets a column-major matrix array buffer compatible with OpenGL standard. Essentially converts from a row-major to column-major and OpenGL compatible matrix. Useful when calling OpenGL functions glLoadMatrix[fd]() and glMultMatrix[fd](). | |
| template<typename R > | |
| TMatrix44 & | fromOpenGL (const R *matrix) |
| Assigns a column-major matrix array compatible with the OpenGL standard. Essentially converts from an OpenGL having column-major to this row-major matrix. It assigns a transposed copy of the data to the internal storage matrix. | |
| TQuaternion< T > | quaternion () const |
| Convert the rotation matrix part to identity/unit quaternion. Calls TQuaternion::fromMatrix() | |
| TMatrix44 & | resetOrientation () |
| Resets the orientation and leaves the translation as is. | |
| TMatrix44 & | setOrientationXY (const TVector3D< T > &x_axis, const TVector3D< T > &y_axis, bool x_dominant=false) |
| Set orientation using two vectors X and Y which spans a surface having a dominant axis. The non-dominant axis is corrected when not perpendicular to the dominant axis. | |
| TMatrix44 & | setOrientationZY (const TVector3D< T > &z_axis, const TVector3D< T > &y_axis, bool z_dominant=false) |
| Set orientation using two vectors Z and Y which spans a surface having a dominant axis. The non-dominant axis is corrected when not perpendicular to the dominant axis. | |
| TMatrix44 & | insertGIGRotXYZ (T rx, T ry, T rz) |
| Another way of applying rotation to the matrix. | |
| std::string | toString (int digits=0) const |
| Gets the string representation of the matrix formed like '({m00,m01,m02,m03},{m10,m11,m12,m13},{m20,m21,m22,m23},{m30,m31,m32,m33})'. | |
| TMatrix44 & | fromString (const std::string &s, bool ignore_err=false) noexcept(false) |
| Gets matrix values from the string representation formed like '({1,2,3,4},{11,12,13,14},{21,22,23,24},{31,32,33,34})'. Throws an exception when the string is not in the correct format. | |
Static Public Attributes | |
| static constexpr auto | tolerance = TVector3D<T>::tolerance |
| Tolerance for when comparing in the equal operator. | |
Protected Attributes | |
| union sf::TMatrix44::data_type | _data = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} |
Generic 4 x 4 matrix template.
| typedef T sf::TMatrix44< T >::value_type |
Type accessible when implemented.
| enum sf::TMatrix44::EAxis : unsigned int |
|
default |
Default constructor which is by default a unit-matrix.
| sf::TMatrix44< T >::TMatrix44 | ( | T | m00, |
| T | m01, | ||
| T | m02, | ||
| T | m03, | ||
| T | m10, | ||
| T | m11, | ||
| T | m12, | ||
| T | m13, | ||
| T | m20, | ||
| T | m21, | ||
| T | m22, | ||
| T | m23, | ||
| T | m30, | ||
| T | m31, | ||
| T | m32, | ||
| T | m33 | ||
| ) |
Initialization constructor for 16 single floating point values.
| sf::TMatrix44< T >::TMatrix44 | ( | std::initializer_list< T[4]> | list | ) |
Constructor using an initializer list.
|
explicit |
Initialization constructor for 4x4 floating point values.
|
explicit |
Initialization constructor for 16 floating point values.
|
explicit |
Construct from a translation vector. Construct a translation transformation from a given 3D Vector.
| sf::TMatrix44< T >::TMatrix44 | ( | T | tilt, |
| T | pan, | ||
| T | roll | ||
| ) |
Constructs a matrix from rotations for each axis.
| sf::TMatrix44< T >::TMatrix44 | ( | const TMatrix44< T > & | ) |
Copy constructor.
|
noexcept |
Move constructor.
| TMatrix44 & sf::TMatrix44< T >::assign | ( | const T * | ) |
Assigns the 16 values from the pointer to this matrix.
| TMatrix44 & sf::TMatrix44< T >::assign | ( | const T | [4][4] | ) |
Assigns the 4x4 array structure to this matrix.
| TMatrix44 & sf::TMatrix44< T >::clearTranslation | ( | ) |
Zero's or clears translation part of this instance.
| void sf::TMatrix44< T >::copyTo | ( | T * | , |
| bool | column_order = false |
||
| ) | const |
Copies the matrix to a 16-element deep array in row or column order..
| void sf::TMatrix44< T >::copyTo | ( | T | [4][4], |
| bool | column_order = false |
||
| ) | const |
Copies the matrix to a 4x4 array in row or column order.
| value_type * sf::TMatrix44< T >::data | ( | ) |
Gets the pointer to the array of this matrix.
| const value_type * sf::TMatrix44< T >::data | ( | ) | const |
Gets the pointer to the array of this matrix.
| T sf::TMatrix44< T >::determinant | ( | ) | const |
Gets the 3x3 determinant from this instance.
| T & sf::TMatrix44< T >::element | ( | unsigned int | row, |
| unsigned int | column | ||
| ) |
Gets the element reference specified by the row and column.
| row | Row number between 0 and 3. |
| column | Column number between 0 and 3. |
| T sf::TMatrix44< T >::element | ( | unsigned int | row, |
| unsigned int | column | ||
| ) | const |
Gets the element specified by the row and column.
| row | Row number between 0 and 3. |
| column | Column number between 0 and 3. |
| TMatrix44 & sf::TMatrix44< T >::fromOpenGL | ( | const R * | matrix | ) |
Assigns a column-major matrix array compatible with the OpenGL standard. Essentially converts from an OpenGL having column-major to this row-major matrix. It assigns a transposed copy of the data to the internal storage matrix.
| R | Type of the array pointer. |
| TMatrix44 & sf::TMatrix44< T >::fromString | ( | const std::string & | s, |
| bool | ignore_err = false |
||
| ) |
Gets matrix values from the string representation formed like '({1,2,3,4},{11,12,13,14},{21,22,23,24},{31,32,33,34})'. Throws an exception when the string is not in the correct format.
| s | Formatted string to read the values from. |
| ignore_err | Determines to throw an exception or not. |
| std::invalid_argument |
| TVector3D< T > sf::TMatrix44< T >::getAxis | ( | EAxis | axis | ) | const |
Gets the given axis of matrix as a 3D vector.
| axis | Requested axis. |
| void sf::TMatrix44< T >::getTiltPanRoll | ( | T & | tilt, |
| T & | pan, | ||
| T & | roll | ||
| ) | const |
Translates rotation part of matrix to tilt, pan and roll values.
| tilt | Tilt angle in radians. |
| pan | Pan angle in radians. |
| roll | Roll angle in radians. |
| TVector3D< T > sf::TMatrix44< T >::getTranslation | ( | ) | const |
Gets translation part of matrix.
| TMatrix44 & sf::TMatrix44< T >::insertGIGRotXYZ | ( | T | rx, |
| T | ry, | ||
| T | rz | ||
| ) |
Another way of applying rotation to the matrix.
| rx | X in Radians. |
| ry | Y in Radians |
| rz | Z in Radians. |
| TMatrix44 sf::TMatrix44< T >::inverse | ( | ) | const |
| TMatrix44 & sf::TMatrix44< T >::invert | ( | ) |
Inverts this matrix.
| std::range_error |
| bool sf::TMatrix44< T >::isEqual | ( | const TMatrix44< T > & | m, |
| T | tol = tolerance |
||
| ) | const |
Compares the passed matrix within the set tolerance.
| m | Matrix to compare with. |
| tol | The tolerance when comparing which has a default. |
| bool sf::TMatrix44< T >::isRotational | ( | ) | const |
Determines if the matrix is a rotation matrix.
| TMatrix44 sf::TMatrix44< T >::multiplied | ( | const TMatrix44< T > & | m | ) | const |
Same as multiply() but returns the changed matrix and does not affect this matrix.
| TMatrix44 & sf::TMatrix44< T >::multiply | ( | const TMatrix44< T > & | m | ) |
Multiplies this matrix with the passed one so that the given matrix is applied on the matrix axes.
| sf::TMatrix44< T >::operator const T * | ( | ) | const |
Cast operator to the pointer of type 'T'.
| sf::TMatrix44< T >::operator T* | ( | ) |
Cast operator to the pointer of type 'T'.
| bool sf::TMatrix44< T >::operator!= | ( | const TMatrix44< T > & | ) | const |
Compare unequal operator using the tolerance when comparing.
| T & sf::TMatrix44< T >::operator() | ( | int | row, |
| int | column | ||
| ) |
Function operator for row column value manipulations. This is different from the element() method.
| row | Row index. |
| column | Column index. |
| T sf::TMatrix44< T >::operator() | ( | int | row, |
| int | column | ||
| ) | const |
| TVector3D< T > sf::TMatrix44< T >::operator* | ( | const TVector3D< T > & | ) | const |
Applies matrix on the passed 3D vector including the translation. Calls method transformed() on the passed 3D vector with the translation included.
| TMatrix44 & sf::TMatrix44< T >::operator*= | ( | const TMatrix44< T > & | ) |
Applies passed matrix on the axes of this matrix.
| TMatrix44 & sf::TMatrix44< T >::operator= | ( | const TMatrix44< T > & | ) |
Assignment operator.
|
noexcept |
Assignment move operator.
| bool sf::TMatrix44< T >::operator== | ( | const TMatrix44< T > & | ) | const |
Compare equal operator using the tolerance when comparing.
| TVector3D< T > sf::TMatrix44< T >::operator^ | ( | const TVector3D< T > & | ) | const |
Applies matrix on the passed 3D vector including the translation. Calls method transformed() on the passed 3D-vector excluding the translation.
| TMatrix44 sf::TMatrix44< T >::orbit | ( | T | horizontal, |
| T | vertical | ||
| ) | const |
Gets transformation of rotation around the local x- and y-axis of the current matrix.
| horizontal | |
| vertical |
| TMatrix44 sf::TMatrix44< T >::orientation | ( | ) | const |
Gets the orientation part of matrix.
| TQuaternion< T > sf::TMatrix44< T >::quaternion | ( | ) | const |
Convert the rotation matrix part to identity/unit quaternion. Calls TQuaternion::fromMatrix()
| TMatrix44 & sf::TMatrix44< T >::resetOrientation | ( | ) |
Resets the orientation and leaves the translation as is.
| TMatrix44 & sf::TMatrix44< T >::rotate | ( | const TMatrix44< T > & | m | ) |
Multiplies this matrix only with the 3x3 part of the given matrix applying only rotation and scaling.
| TMatrix44 & sf::TMatrix44< T >::rotate | ( | T | angle, |
| const TVector3D< T > & | vec, | ||
| bool | only = true |
||
| ) |
Applies rotation on the current matrix around a vector.
| angle | Angle of rotation in radians. |
| vec | Vector to rotating around. |
| only | When true, it only rotates and leaves the translation untouched. |
| TMatrix44 & sf::TMatrix44< T >::rotate | ( | T | angle, |
| T | x, | ||
| T | y, | ||
| T | z, | ||
| bool | only = true |
||
| ) |
Applies rotation on the current matrix.
| angle | Angle of rotation in radians. |
| x | Rotation around the horizontal (x-axis). |
| y | Rotation around the vertical (y-axis). |
| z | Rotation around the forward (z-axis). |
| only | When true, it only rotates and leaves the translation untouched. |
| TMatrix44 sf::TMatrix44< T >::rotated | ( | const TMatrix44< T > & | m | ) | const |
Same as rotate() but returns the changed matrix and does not affect this matrix.
| TMatrix44 sf::TMatrix44< T >::rotated | ( | T | angle, |
| const TVector3D< T > & | vec, | ||
| bool | only = true |
||
| ) | const |
Same as rotate() but only returns the changed matrix and does not affect this matrix.
| angle | Angle of rotation. |
| vec | Vector to rotating around. |
| only | When true, it only rotates and leaves the translation untouched. |
| TMatrix44 sf::TMatrix44< T >::rotated | ( | T | angle, |
| T | x, | ||
| T | y, | ||
| T | z, | ||
| bool | only = true |
||
| ) | const |
Same as rotate() but only returns the changed matrix and does not affect this matrix.
| angle | Angle of rotation. |
| x | Rotation around the horizontal (x-axis). |
| y | Rotation around the vertical (y-axis). |
| z | Rotation around the forward (z-axis). |
| only | When true, it only rotates and leaves the translation untouched. |
| TMatrix44 & sf::TMatrix44< T >::scale | ( | T | factor, |
| bool | translation = true |
||
| ) |
Multiplies this matrix by the given factor. Leave the matrix translation vector alone.
| factor | Scaling factor. |
| translation | When true he translation is scaled as well. |
| TMatrix44 & sf::TMatrix44< T >::scale | ( | T | x, |
| T | y, | ||
| T | z, | ||
| bool | translation = true |
||
| ) |
Multiplies this matrix by the given factors for x, y and z-axis. Leave the matrix translation vector alone.
| x | Scaling x-factor. |
| y | Scaling y-factor. |
| z | Scaling z-factor. |
| translation | When true he translation is scaled as well. |
| TMatrix44 & sf::TMatrix44< T >::scale | ( | TVector3D< T > | factor, |
| bool | translation = true |
||
| ) |
Multiplies this matrix by the given factors for x, y and z-axis. Leave the matrix translation vector alone.
| factor | All scaling factors given by a 3D vector. |
| translation | When true he translation is scaled as well. |
| void sf::TMatrix44< T >::setElement | ( | unsigned int | row, |
| unsigned int | column, | ||
| T | value | ||
| ) |
Sets the element specified by the row and column.
| row | Row number between 0 and 3. |
| column | Column number between 0 and 3. |
| value | Element value. |
| TMatrix44 & sf::TMatrix44< T >::setOrientationXY | ( | const TVector3D< T > & | x_axis, |
| const TVector3D< T > & | y_axis, | ||
| bool | x_dominant = false |
||
| ) |
Set orientation using two vectors X and Y which spans a surface having a dominant axis. The non-dominant axis is corrected when not perpendicular to the dominant axis.
| x_axis | Vector X, which spans the XY area. |
| y_axis | Vector Y, which spans the XY area. |
| x_dominant | When true, dominant is the X-axis. |
| std::invalid_argument |
| TMatrix44 & sf::TMatrix44< T >::setOrientationZY | ( | const TVector3D< T > & | z_axis, |
| const TVector3D< T > & | y_axis, | ||
| bool | z_dominant = false |
||
| ) |
Set orientation using two vectors Z and Y which spans a surface having a dominant axis. The non-dominant axis is corrected when not perpendicular to the dominant axis.
| z_axis | Vector Z, which spans the ZY area. |
| y_axis | Vector Y, which spans the ZY area. |
| z_dominant | When true, dominant is the Z-axis. |
| std::invalid_argument |
| void sf::TMatrix44< T >::setPerspectiveProjection | ( | T | near_plane, |
| T | far_plane, | ||
| T | fov | ||
| ) |
Sets the projection for this matrix.
| near_plane | Near plane of the camera frustum. |
| far_plane | Far plane of the camera frustum. |
| fov | Field of view in radians. |
| TMatrix44 & sf::TMatrix44< T >::setTiltPanRoll | ( | T | tilt, |
| T | pan, | ||
| T | roll | ||
| ) |
Sets/resets rotation part of the matrix according to tilt pan roll and does not touch the translation or scaling part.
| tilt | Tilt is a rotation around the horizontal (x-axis). |
| pan | Pan is a rotation around the vertical (y-axis). |
| roll | Roll is a rotation around the forward (z-axis). |
| TMatrix44 & sf::TMatrix44< T >::setTranslation | ( | const TVector3D< T > & | v | ) |
Sets translation part of this matrix.
| TMatrix44 & sf::TMatrix44< T >::setTranslation | ( | T | x, |
| T | y, | ||
| T | z | ||
| ) |
Sets translation part of this matrix.
| std::array< R, 16 > sf::TMatrix44< T >::toOpenGL | ( | ) | const |
Gets a column-major matrix array buffer compatible with OpenGL standard. Essentially converts from a row-major to column-major and OpenGL compatible matrix. Useful when calling OpenGL functions glLoadMatrix[fd]() and glMultMatrix[fd]().
| R | Type of the array. |
Copies this matrix to a column-major matrix array compatible with OpenGL standard. A one-on-one copy is not possible, and a transpose of the 3x3 matrix part within is needed.
| matrix | Array pointer expected to be at least of 16-element length. |
| std::string sf::TMatrix44< T >::toString | ( | int | digits = 0 | ) | const |
Gets the string representation of the matrix formed like '({m00,m01,m02,m03},{m10,m11,m12,m13},{m20,m21,m22,m23},{m30,m31,m32,m33})'.
| TVector3D< T > sf::TMatrix44< T >::transformed | ( | const TVector3D< T > & | v, |
| bool | translate | ||
| ) | const |
Applies the matrix rotation up on a 3D-vector.
| v | 3D vector. |
| translate | When true, the translation part is included. |
| TMatrix44 & sf::TMatrix44< T >::translate | ( | const TVector3D< T > & | v, |
| bool | only = true |
||
| ) |
Adds a translation to this instance using a 3D vector.
| v | Vector to additionally translate to. |
| only | When true, the translation is applied without transformation. |
| TMatrix44 & sf::TMatrix44< T >::translate | ( | T | x, |
| T | y, | ||
| T | z, | ||
| bool | only = true |
||
| ) |
Adds a translation of this instance using individual values for each axis.
| x | X-axis value to translate. |
| y | Y-axis value to translate. |
| z | Z-axis value to translate. |
| only | When true, the translation is applied without transformation. |
| TMatrix44 sf::TMatrix44< T >::translated | ( | const TVector3D< T > & | v, |
| bool | only = true |
||
| ) | const |
Same as translate() but does not change this matrix only returns the translated one.
| v | Vector to additionally translate to. |
| only | When true, the translation is applied without transformation. |
| TMatrix44 sf::TMatrix44< T >::translated | ( | T | x, |
| T | y, | ||
| T | z, | ||
| bool | only = true |
||
| ) | const |
Same as translate() but does not change this matrix only returns the translated one.
| x | X-axis value to translate. |
| y | Y-axis value to translate. |
| z | Z-axis value to translate. |
| only | When true, the translation is applied without transformation. |
| TMatrix44 & sf::TMatrix44< T >::transpose | ( | ) |
Transpose this matrix.
| TMatrix44 & sf::TMatrix44< T >::transposeAssign | ( | const T | [4][4] | ) |
Assigns the transposed 4x4 array structure to this matrix.
| TMatrix44 sf::TMatrix44< T >::transposed | ( | ) | const |
Get a transposed matrix of this instance.
| TMatrix44 & sf::TMatrix44< T >::unit | ( | ) |
Set or resets this instance as a unit/identity matrix. A unit matrix, also known as the identity matrix, is a square matrix in which all the elements along the main diagonal (from the top-left to the bottom-right) are 1, and all other elements are 0. It acts as the multiplicative identity in matrix algebra, meaning that multiplying any matrix by the identity matrix results in the original matrix itself.
|
protected |
|
staticconstexpr |
Tolerance for when comparing in the equal operator.
Used as: std::fabs(x1 - x2) < tolerance