The QGenericMatrix class is a template class that represents a NxM transformation matrix with N columns and M rows. 更多...
| 頭: | #include <QGenericMatrix> |
| qmake: | QT += gui |
| Since: | Qt 4.6 |
| QGenericMatrix () | |
| QGenericMatrix (const T * values ) | |
| 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 = ...) 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 = ...) |
| QGenericMatrix<N, M, T> & | operator-= (const QGenericMatrix<N, M, T> & other = ...) |
| QGenericMatrix<N, M, T> & | operator/= (T divisor ) |
| bool | operator== (const QGenericMatrix<N, M, T> & other = ...) const |
| typedef | QMatrix2x2 |
| typedef | QMatrix2x3 |
| typedef | QMatrix2x4 |
| typedef | QMatrix3x2 |
| typedef | QMatrix3x3 |
| typedef | QMatrix3x4 |
| typedef | QMatrix4x2 |
| typedef | QMatrix4x3 |
| QGenericMatrix<M1, M2, TT> | operator* (const QGenericMatrix<NN, M2, TT> & m1 = ..., const QGenericMatrix<M1, NN, TT> & m2 = ...) |
| QGenericMatrix<N, M, T> | operator* (T factor , const QGenericMatrix<N, M, T> & matrix = ...) |
| QGenericMatrix<N, M, T> | operator* (const QGenericMatrix<N, M, T> & matrix = ..., T factor ) |
| QGenericMatrix<N, M, T> | operator+ (const QGenericMatrix<N, M, T> & m1 = ..., const QGenericMatrix<N, M, T> & m2 = ...) |
| QGenericMatrix<N, M, T> | operator- (const QGenericMatrix<N, M, T> & m1 = ..., const QGenericMatrix<N, M, T> & m2 = ...) |
| QGenericMatrix<N, M, T> | operator- (const QGenericMatrix<N, M, T> & matrix = ...) |
| QGenericMatrix<N, M, T> | operator/ (const QGenericMatrix<N, M, T> & matrix = ..., T divisor ) |
| QDataStream & | operator<< (QDataStream & stream , const QGenericMatrix<N, M, T> & matrix = ...) |
| QDataStream & | operator>> (QDataStream & stream , QGenericMatrix<N, M, T> & matrix = ...) |
The QGenericMatrix class is a template class that represents a NxM transformation matrix with N columns and M rows.
The QGenericMatrix template has three parameters:
| N | 列數。 |
| M | 行數。 |
| T | 類用戶可見的元素類型。 |
另請參閱 QMatrix4x4 .
構造 NxM 恒等矩陣。
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.
另請參閱 copyDataTo ().
Returns a constant pointer to the raw data of this matrix.
另請參閱 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.
另請參閱 constData ().
Returns a constant pointer to the raw data of this matrix.
另請參閱 constData ().
Fills all elements of this matrix with value .
返迴
true
if this matrix is the identity; false otherwise.
另請參閱 setToIdentity ().
將此矩陣設為恒等。
另請參閱 isIdentity ().
Returns this matrix, transposed about its diagonal.
返迴
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 .
返迴
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 .
返迴和對於 m1 and m2 .
Returns the difference of m1 and m2 .
這是重載函數。
Returns the negation of matrix .
Returns the result of dividing all elements of matrix by divisor .
寫入給定 matrix 到給定 stream 並返迴流引用。
另請參閱 序列化 Qt 數據類型 .
Reads a NxM matrix from the given stream 進給定 matrix 並返迴流引用。
另請參閱 序列化 Qt 數據類型 .