The QGenericMatrix class is a template class that represents a NxM transformation matrix with N columns and M rows. More...
Header: | #include <QGenericMatrix> |
CMake: | find_package(Qt6 COMPONENTS Gui REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
QGenericMatrix(const T *values) | |
QGenericMatrix() | |
const T * | constData() const |
void | copyDataTo(T *values) const |
T * | data() |
const T * | data() const |
void | fill(T value) |
bool | isIdentity() const |
void | setToIdentity() |
QGenericMatrix<M, N, T> | transposed() const |
bool | operator!=(const QGenericMatrix<N, M, T> &other = N) const |
const T & | operator()(int row, int column) const |
T & | operator()(int row, int column) |
QGenericMatrix<N, M, T> & | operator*=(T factor) |
QGenericMatrix<N, M, T> & | operator+=(const QGenericMatrix<N, M, T> &other = N) |
QGenericMatrix<N, M, T> & | operator-=(const QGenericMatrix<N, M, T> &other = N) |
QGenericMatrix<N, M, T> & | operator/=(T divisor) |
bool | operator==(const QGenericMatrix<N, M, T> &other = N) const |
QMatrix2x2 | |
QMatrix2x3 | |
QMatrix2x4 | |
QMatrix3x2 | |
QMatrix3x3 | |
QMatrix3x4 | |
QMatrix4x2 | |
QMatrix4x3 | |
QGenericMatrix<M1, M2, TT> | operator*(const QGenericMatrix<NN, M2, TT> &m1 = NN, const QGenericMatrix<M1, NN, TT> &m2 = M1) |
QGenericMatrix<N, M, T> | operator*(T factor, const QGenericMatrix<N, M, T> &matrix = N) |
QGenericMatrix<N, M, T> | operator*(const QGenericMatrix<N, M, T> &matrix = N, T factor) |
QGenericMatrix<N, M, T> | operator+(const QGenericMatrix<N, M, T> &m1 = N, const QGenericMatrix<N, M, T> &m2 = N) |
QGenericMatrix<N, M, T> | operator-(const QGenericMatrix<N, M, T> &m1 = N, const QGenericMatrix<N, M, T> &m2 = N) |
QGenericMatrix<N, M, T> | operator-(const QGenericMatrix<N, M, T> &matrix = N) |
QGenericMatrix<N, M, T> | operator/(const QGenericMatrix<N, M, T> &matrix = N, T divisor) |
QDataStream & | operator<<(QDataStream &stream, const QGenericMatrix<N, M, T> &matrix = N) |
QDataStream & | operator>>(QDataStream &stream, QGenericMatrix<N, M, T> &matrix = N) |
The QGenericMatrix template has three parameters:
N | Number of columns. |
M | Number of rows. |
T | Element type that is visible to users of the class. |
See also QMatrix4x4.
Constructs a matrix from the given N * M floating-point values. The contents of the array values is assumed to be in row-major order.
See also copyDataTo().
Constructs a NxM identity matrix.
Returns a constant pointer to the raw data of this matrix.
See also data().
Retrieves the N * M items in this matrix and copies them to values in row-major order.
Returns a pointer to the raw data of this matrix.
See also constData().
Returns a constant pointer to the raw data of this matrix.
See also constData().
Fills all elements of this matrix with value.
Returns true
if this matrix is the identity; false otherwise.
See also setToIdentity().
Sets this matrix to the identity.
See also isIdentity().
Returns this matrix, transposed about its diagonal.
Returns true
if this matrix is not identical to other; false otherwise.
Returns a constant reference to the element at position (row, column) in this matrix.
Returns a reference to the element at position (row, column) in this matrix so that the element can be assigned to.
Multiplies all elements of this matrix by factor.
Adds the contents of other to this matrix.
Subtracts the contents of other from this matrix.
Divides all elements of this matrix by divisor.
Returns true
if this matrix is identical to other; false otherwise.
The QMatrix2x2 type defines a convenient instantiation of the QGenericMatrix template for 2 columns, 2 rows, and float as the element type.
The QMatrix2x3 type defines a convenient instantiation of the QGenericMatrix template for 2 columns, 3 rows, and float as the element type.
The QMatrix2x4 type defines a convenient instantiation of the QGenericMatrix template for 2 columns, 4 rows, and float as the element type.
The QMatrix3x2 type defines a convenient instantiation of the QGenericMatrix template for 3 columns, 2 rows, and float as the element type.
The QMatrix3x3 type defines a convenient instantiation of the QGenericMatrix template for 3 columns, 3 rows, and float as the element type.
The QMatrix3x4 type defines a convenient instantiation of the QGenericMatrix template for 3 columns, 4 rows, and float as the element type.
The QMatrix4x2 type defines a convenient instantiation of the QGenericMatrix template for 4 columns, 2 rows, and float as the element type.
The QMatrix4x3 type defines a convenient instantiation of the QGenericMatrix template for 4 columns, 3 rows, and float as the element type.
Returns the product of the NNxM2 matrix m1 and the M1xNN matrix m2 to produce a M1xM2 matrix result.
Returns the result of multiplying all elements of matrix by factor.
Returns the result of multiplying all elements of matrix by factor.
Returns the sum of m1 and m2.
Returns the difference of m1 and m2.
This is an overloaded function.
Returns the negation of matrix.
Returns the result of dividing all elements of matrix by divisor.
Writes the given matrix to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
Reads a NxM matrix from the given stream into the given matrix and returns a reference to the stream.
See also Serializing Qt Data Types.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qgenericmatrix.html