![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Generic matrix of 4 x 4 elements. To be used in conjunction with NCollection_Vec4 entities. Originally introduced for 3D space projection and orientation operations. Warning, empty constructor returns an identity matrix. More...
#include <NCollection_Mat4.hxx>
Public Member Functions | |
| constexpr | NCollection_Mat4 () |
| Empty constructor. Construct the identity matrix. | |
| template<typename OtherElement_t > | |
| constexpr | NCollection_Mat4 (const NCollection_Mat4< OtherElement_t > &theOtherMat4) noexcept |
| Conversion constructor (explicitly converts some 4 x 4 matrix with other element type to a new 4 x 4 matrix with the element type Element_t, whose elements are static_cast'ed corresponding elements of theOtherMat4 matrix) | |
| constexpr Element_t | GetValue (const size_t theRow, const size_t theCol) const noexcept |
| Get element at the specified row and column. | |
| constexpr Element_t & | ChangeValue (const size_t theRow, const size_t theCol) noexcept |
| Access element at the specified row and column. | |
| constexpr void | SetValue (const size_t theRow, const size_t theCol, const Element_t theValue) noexcept |
| Set value for the element specified by row and columns. | |
| constexpr Element_t & | operator() (const size_t theRow, const size_t theCol) noexcept |
| Return value. | |
| constexpr Element_t | operator() (const size_t theRow, const size_t theCol) const noexcept |
| Return value. | |
| constexpr NCollection_Vec4< Element_t > | GetRow (const size_t theRow) const noexcept |
| Get vector of elements for the specified row. | |
| constexpr void | SetRow (const size_t theRow, const NCollection_Vec3< Element_t > &theVec) noexcept |
| Change first 3 row values by the passed vector. | |
| constexpr void | SetRow (const size_t theRow, const NCollection_Vec4< Element_t > &theVec) noexcept |
| Set row values by the passed 4 element vector. | |
| constexpr NCollection_Vec4< Element_t > | GetColumn (const size_t theCol) const noexcept |
| Get vector of elements for the specified column. | |
| constexpr void | SetColumn (const size_t theCol, const NCollection_Vec3< Element_t > &theVec) noexcept |
| Change first 3 column values by the passed vector. | |
| constexpr void | SetColumn (const size_t theCol, const NCollection_Vec4< Element_t > &theVec) noexcept |
| Set column values by the passed 4 element vector. | |
| constexpr NCollection_Vec4< Element_t > | GetDiagonal () const noexcept |
| Get vector of diagonal elements. | |
| constexpr void | SetDiagonal (const NCollection_Vec3< Element_t > &theVec) noexcept |
| Change first 3 elements of the diagonal matrix. | |
| constexpr void | SetDiagonal (const NCollection_Vec4< Element_t > &theVec) noexcept |
| Set diagonal elements of the matrix by the passed vector. | |
| constexpr NCollection_Mat3< Element_t > | GetMat3 () const noexcept |
| Return 3x3 sub-matrix. | |
| constexpr void | InitZero () noexcept |
| Initialize the zero matrix. | |
| constexpr bool | IsZero () const noexcept |
| Checks the matrix for zero (without tolerance). | |
| constexpr void | InitIdentity () noexcept |
| Initialize the identity matrix. | |
| constexpr bool | IsIdentity () const noexcept |
| Checks the matrix for identity (without tolerance). | |
| constexpr bool | IsEqual (const NCollection_Mat4 &theOther) const noexcept |
| Check this matrix for equality with another matrix (without tolerance!). | |
| constexpr bool | operator== (const NCollection_Mat4 &theOther) const noexcept |
| Check this matrix for equality with another matrix (without tolerance!). | |
| constexpr bool | operator!= (const NCollection_Mat4 &theOther) const noexcept |
| Check this matrix for non-equality with another matrix (without tolerance!). | |
| constexpr const Element_t * | GetData () const noexcept |
| Raw access to the data (for OpenGL exchange); the data is returned in column-major order. | |
| constexpr Element_t * | ChangeData () noexcept |
| constexpr NCollection_Vec4< Element_t > | operator* (const NCollection_Vec4< Element_t > &theVec) const noexcept |
| Multiply by the vector (M * V). | |
| constexpr void | Multiply (const NCollection_Mat4 &theMat) noexcept |
| Compute matrix multiplication. | |
| constexpr NCollection_Mat4 & | operator*= (const NCollection_Mat4 &theMat) noexcept |
| Multiply by the another matrix. | |
| constexpr NCollection_Mat4 | operator* (const NCollection_Mat4 &theMat) const noexcept |
| Compute matrix multiplication product. | |
| constexpr NCollection_Mat4 | Multiplied (const NCollection_Mat4 &theMat) const noexcept |
| Compute matrix multiplication product. | |
| constexpr void | Multiply (const Element_t theFactor) noexcept |
| Compute per-component multiplication. | |
| constexpr NCollection_Mat4 & | operator*= (const Element_t theFactor) noexcept |
| Compute per-element multiplication. | |
| constexpr NCollection_Mat4 | operator* (const Element_t theFactor) const noexcept |
| Compute per-element multiplication. | |
| constexpr NCollection_Mat4 | Multiplied (const Element_t theFactor) const noexcept |
| Compute per-element multiplication. | |
| constexpr void | Divide (const Element_t theFactor) |
| Compute per-component division. | |
| constexpr NCollection_Mat4 & | operator/= (const Element_t theScalar) |
| Per-component division. | |
| constexpr NCollection_Mat4 | Divided (const Element_t theScalar) const |
| Divides all the coefficients of the matrix by scalar. | |
| constexpr NCollection_Mat4 | operator/ (const Element_t theScalar) const |
| Divides all the coefficients of the matrix by scalar. | |
| constexpr void | Add (const NCollection_Mat4 &theMat) noexcept |
| Per-component addition of another matrix. | |
| constexpr NCollection_Mat4 & | operator+= (const NCollection_Mat4 &theMat) noexcept |
| Per-component addition of another matrix. | |
| constexpr void | Subtract (const NCollection_Mat4 &theMat) noexcept |
| Per-component subtraction of another matrix. | |
| constexpr NCollection_Mat4 & | operator-= (const NCollection_Mat4 &theMat) noexcept |
| Per-component subtraction of another matrix. | |
| constexpr NCollection_Mat4 | Added (const NCollection_Mat4 &theMat) const noexcept |
| Per-component addition of another matrix. | |
| constexpr NCollection_Mat4 | operator+ (const NCollection_Mat4 &theMat) const noexcept |
| Per-component addition of another matrix. | |
| constexpr NCollection_Mat4 | Subtracted (const NCollection_Mat4 &theMat) const noexcept |
| Per-component subtraction of another matrix. | |
| constexpr NCollection_Mat4 | operator- (const NCollection_Mat4 &theMat) const noexcept |
| Per-component subtraction of another matrix. | |
| constexpr NCollection_Mat4 | Negated () const noexcept |
| Returns matrix with all components negated. | |
| constexpr NCollection_Mat4 | operator- () const noexcept |
| Returns matrix with all components negated. | |
| constexpr void | Translate (const NCollection_Vec3< Element_t > &theVec) noexcept |
| Translate the matrix on the passed vector. | |
| constexpr NCollection_Mat4 | Transposed () const noexcept |
| Transpose the matrix. | |
| constexpr void | Transpose () noexcept |
| Transpose the matrix. | |
| bool | Inverted (NCollection_Mat4< Element_t > &theOutMx, Element_t &theDet) const |
| Compute inverted matrix. | |
| bool | Inverted (NCollection_Mat4< Element_t > &theOutMx) const |
| Compute inverted matrix. | |
| NCollection_Mat4 | Inverted () const |
| Return inverted matrix. | |
| constexpr Element_t | DeterminantMat3 () const noexcept |
| Return determinant of the 3x3 sub-matrix. | |
| constexpr NCollection_Mat4< Element_t > | Adjoint () const noexcept |
| Return adjoint (adjugate matrix, e.g. conjugate transpose). | |
| template<typename Other_t > | |
| constexpr void | ConvertFrom (const NCollection_Mat4< Other_t > &theFrom) noexcept |
| Take values from NCollection_Mat4 with a different element type with type conversion. | |
| template<typename Other_t > | |
| constexpr void | Convert (const NCollection_Mat4< Other_t > &theFrom) noexcept |
| Take values from NCollection_Mat4 with a different element type with type conversion. | |
| void | DumpJson (Standard_OStream &theOStream, int) const |
| Dumps the content of me into the stream. | |
Static Public Member Functions | |
| static constexpr size_t | Rows () noexcept |
| Get number of rows. | |
| static constexpr size_t | Cols () noexcept |
| Get number of columns. | |
| static constexpr NCollection_Mat4 | Identity () |
| Return identity matrix. | |
| static constexpr NCollection_Mat4 | Zero () |
| Return zero matrix. | |
| static constexpr NCollection_Mat4 | Multiply (const NCollection_Mat4 &theMatA, const NCollection_Mat4 &theMatB) noexcept |
| Compute matrix multiplication product: A * B. | |
| static NCollection_Mat4< Element_t > & | Map (Element_t *theData) noexcept |
| Maps plain C array to matrix type. | |
| static const NCollection_Mat4< Element_t > & | Map (const Element_t *theData) noexcept |
| Maps plain C array to matrix type. | |
Generic matrix of 4 x 4 elements. To be used in conjunction with NCollection_Vec4 entities. Originally introduced for 3D space projection and orientation operations. Warning, empty constructor returns an identity matrix.
|
inlineconstexpr |
Empty constructor. Construct the identity matrix.
|
inlineexplicitconstexprnoexcept |
Conversion constructor (explicitly converts some 4 x 4 matrix with other element type to a new 4 x 4 matrix with the element type Element_t, whose elements are static_cast'ed corresponding elements of theOtherMat4 matrix)
| OtherElement_t | the element type of the other 4 x 4 matrix theOtherVec4 |
| theOtherMat4 | the 4 x 4 matrix that needs to be converted |
|
inlineconstexprnoexcept |
Per-component addition of another matrix.
|
inlineconstexprnoexcept |
Per-component addition of another matrix.
|
inlineconstexprnoexcept |
Return adjoint (adjugate matrix, e.g. conjugate transpose).
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Access element at the specified row and column.
| [in] | theRow | the row to access. |
| [in] | theCol | the column to access. |
|
inlinestaticconstexprnoexcept |
Get number of columns.
|
inlineconstexprnoexcept |
Take values from NCollection_Mat4 with a different element type with type conversion.
|
inlineconstexprnoexcept |
Take values from NCollection_Mat4 with a different element type with type conversion.
|
inlineconstexprnoexcept |
Return determinant of the 3x3 sub-matrix.
|
inlineconstexpr |
Compute per-component division.
| [in] | theFactor | the scale factor. |
|
inlineconstexpr |
Divides all the coefficients of the matrix by scalar.
|
inline |
Dumps the content of me into the stream.
|
inlineconstexprnoexcept |
Get vector of elements for the specified column.
| [in] | theCol | the column to access. |
|
inlineconstexprnoexcept |
Raw access to the data (for OpenGL exchange); the data is returned in column-major order.
|
inlineconstexprnoexcept |
Get vector of diagonal elements.
|
inlineconstexprnoexcept |
Return 3x3 sub-matrix.
|
inlineconstexprnoexcept |
Get vector of elements for the specified row.
| [in] | theRow | the row to access. |
|
inlineconstexprnoexcept |
Get element at the specified row and column.
| [in] | theRow | the row to address. |
| [in] | theCol | the column to address. |
|
inlinestaticconstexpr |
Return identity matrix.
|
inlineconstexprnoexcept |
Initialize the identity matrix.
|
inlineconstexprnoexcept |
Initialize the zero matrix.
|
inline |
Return inverted matrix.
|
inline |
Compute inverted matrix.
| [out] | theOutMx | the inverted matrix |
|
inline |
Compute inverted matrix.
| [out] | theOutMx | the inverted matrix |
| [out] | theDet | determinant of matrix |
|
inlineconstexprnoexcept |
Check this matrix for equality with another matrix (without tolerance!).
|
inlineconstexprnoexcept |
Checks the matrix for identity (without tolerance).
|
inlineconstexprnoexcept |
Checks the matrix for zero (without tolerance).
|
inlinestaticnoexcept |
Maps plain C array to matrix type.
|
inlinestaticnoexcept |
Maps plain C array to matrix type.
|
inlineconstexprnoexcept |
Compute per-element multiplication.
| [in] | theFactor | the scale factor. |
|
inlineconstexprnoexcept |
Compute matrix multiplication product.
| [in] | theMat | the other matrix. |
|
inlineconstexprnoexcept |
Compute per-component multiplication.
| [in] | theFactor | the scale factor. |
|
inlineconstexprnoexcept |
Compute matrix multiplication.
| [in] | theMat | the matrix to multiply. |
|
inlinestaticconstexprnoexcept |
Compute matrix multiplication product: A * B.
| [in] | theMatA | the matrix "A". |
| [in] | theMatB | the matrix "B". |
|
inlineconstexprnoexcept |
Returns matrix with all components negated.
|
inlineconstexprnoexcept |
Check this matrix for non-equality with another matrix (without tolerance!).
|
inlineconstexprnoexcept |
Return value.
|
inlineconstexprnoexcept |
Return value.
|
inlineconstexprnoexcept |
Compute per-element multiplication.
| [in] | theFactor | the scale factor. |
|
inlineconstexprnoexcept |
Compute matrix multiplication product.
| [in] | theMat | the other matrix. |
|
inlineconstexprnoexcept |
Multiply by the vector (M * V).
| [in] | theVec | the vector to multiply. |
|
inlineconstexprnoexcept |
Compute per-element multiplication.
| [in] | theFactor | the scale factor. |
|
inlineconstexprnoexcept |
Multiply by the another matrix.
| [in] | theMat | the other matrix. |
|
inlineconstexprnoexcept |
Per-component addition of another matrix.
|
inlineconstexprnoexcept |
Per-component addition of another matrix.
|
inlineconstexprnoexcept |
Returns matrix with all components negated.
|
inlineconstexprnoexcept |
Per-component subtraction of another matrix.
|
inlineconstexprnoexcept |
Per-component subtraction of another matrix.
|
inlineconstexpr |
Divides all the coefficients of the matrix by scalar.
|
inlineconstexpr |
Per-component division.
| [in] | theScalar | the scale factor. |
|
inlineconstexprnoexcept |
Check this matrix for equality with another matrix (without tolerance!).
|
inlinestaticconstexprnoexcept |
Get number of rows.
|
inlineconstexprnoexcept |
Change first 3 column values by the passed vector.
| [in] | theCol | the column to change. |
| [in] | theVec | the vector of values. |
|
inlineconstexprnoexcept |
Set column values by the passed 4 element vector.
| [in] | theCol | the column to change. |
| [in] | theVec | the vector of values. |
|
inlineconstexprnoexcept |
Change first 3 elements of the diagonal matrix.
| theVec | the vector of values. |
|
inlineconstexprnoexcept |
Set diagonal elements of the matrix by the passed vector.
| [in] | theVec | the vector of values. |
|
inlineconstexprnoexcept |
Change first 3 row values by the passed vector.
| [in] | theRow | the row to change. |
| [in] | theVec | the vector of values. |
|
inlineconstexprnoexcept |
Set row values by the passed 4 element vector.
| [in] | theRow | the row to change. |
| [in] | theVec | the vector of values. |
|
inlineconstexprnoexcept |
Set value for the element specified by row and columns.
| [in] | theRow | the row to change. |
| [in] | theCol | the column to change. |
| [in] | theValue | the value to set. |
|
inlineconstexprnoexcept |
Per-component subtraction of another matrix.
|
inlineconstexprnoexcept |
Per-component subtraction of another matrix.
|
inlineconstexprnoexcept |
Translate the matrix on the passed vector.
| [in] | theVec | the translation vector. |
|
inlineconstexprnoexcept |
Transpose the matrix.
|
inlineconstexprnoexcept |
Transpose the matrix.
|
inlinestaticconstexpr |
Return zero matrix.