QGenericMatrix Class
template <int N, int M, typename T> class QGenericMatrixDie Klasse `QGenericMatrix` ist eine Template-Klasse, die eine N × M-Transformationsmatrix mit N Spalten und M Zeilen darstellt. Mehr...
| Header: | #include <QGenericMatrix> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
- Liste aller Mitglieder, einschließlich geerbter Mitglieder
- QGenericMatrix ist Teil der Themenbereiche „Malerei-Klassen “ und „3D-Rendering“.
Öffentliche Funktionen
| 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 |
| T & | operator()(int row, int column) |
| const T & | operator()(int row, int column) const |
| 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 |
Verwandte Nicht-Mitglieder
| QMatrix2x2 | |
| QMatrix2x3 | |
| QMatrix2x4 | |
| QMatrix3x2 | |
| QMatrix3x3 | |
| QMatrix3x4 | |
| QMatrix4x2 | |
| QMatrix4x3 | |
| 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<M1, M2, TT> | operator*(const QGenericMatrix<NN, M2, TT> &m1, const QGenericMatrix<M1, NN, TT> &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> &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) |
Ausführliche Beschreibung
QGenericMatrix<N, M, T> ist eine Template-Klasse, wobei N die Anzahl der Spalten, M die Anzahl der Zeilen und T der Elementtyp ist, der für die Benutzer der Klasse sichtbar ist.
Siehe auch QMatrix4x4.
Dokumentation zu den Mitgliedsfunktionen
QGenericMatrix::QGenericMatrix()
Erzeugt eine Identitätsmatrix der Form „ N “ × „ M “.
[explicit] QGenericMatrix::QGenericMatrix(const T *values)
Erstellt eine Matrix aus dem angegebenen Array ` N ` * ` M ` mit Gleitkomma- values. Es wird davon ausgegangen, dass der Inhalt des Arrays ` values ` in zeilenorientierter Reihenfolge vorliegt.
Siehe auch copyDataTo().
const T *QGenericMatrix::constData() const
Gibt einen konstanten Zeiger auf die Rohdaten dieser Matrix zurück.
Siehe auch „ data()“.
void QGenericMatrix::copyDataTo(T *values) const
Ruft die Elemente „ N “ * „ M “ dieser Matrix ab und kopiert sie in Zeilenreihenfolge in „ values “.
T *QGenericMatrix::data()
Gibt einen Zeiger auf die Rohdaten dieser Matrix zurück.
Siehe auch constData().
const T *QGenericMatrix::data() const
Gibt einen konstanten Zeiger auf die Rohdaten dieser Matrix zurück.
Siehe auch „ constData()“.
void QGenericMatrix::fill(T value)
Füllt alle Elemente dieser Matrix mit value.
bool QGenericMatrix::isIdentity() const
Gibt „ true “ zurück, wenn diese Matrix die Einheitsmatrix ist; andernfalls „false“.
Siehe auch setToIdentity().
void QGenericMatrix::setToIdentity()
Setzt diese Matrix auf die Identitätsmatrix.
Siehe auch ` isIdentity()`.
QGenericMatrix<M, N, T> QGenericMatrix::transposed() const
Gibt diese Matrix zurück, die um ihre Diagonale transponiert wurde.
bool QGenericMatrix::operator!=(const QGenericMatrix<N, M, T> &other) const
Gibt „ true “ zurück, wenn diese Matrix nicht mit „ other “ identisch ist; andernfalls „false“.
T &QGenericMatrix::operator()(int row, int column)
Gibt eine Referenz auf das Element an der Position (row, column) in dieser Matrix zurück, sodass das Element zugewiesen werden kann.
const T &QGenericMatrix::operator()(int row, int column) const
Gibt eine konstante Referenz auf das Element an der Position (row, column) in dieser Matrix zurück.
QGenericMatrix<N, M, T> &QGenericMatrix::operator*=(T factor)
Multipliziert alle Elemente dieser Matrix mit factor.
QGenericMatrix<N, M, T> &QGenericMatrix::operator+=(const QGenericMatrix<N, M, T> &other)
Fügt den Inhalt von „ other “ zu dieser Matrix hinzu.
QGenericMatrix<N, M, T> &QGenericMatrix::operator-=(const QGenericMatrix<N, M, T> &other)
Zieht den Inhalt von ` other ` von dieser Matrix ab.
QGenericMatrix<N, M, T> &QGenericMatrix::operator/=(T divisor)
Teilt alle Elemente dieser Matrix durch divisor.
bool QGenericMatrix::operator==(const QGenericMatrix<N, M, T> &other) const
Gibt „ true “ zurück, wenn diese Matrix mit „ other “ identisch ist; andernfalls „false“.
Verwandte Nicht-Mitglieder
QMatrix2x2
Der Typ „QMatrix2x2“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 2 Spalten, 2 Zeilen und den Elementtyp „float“.
QMatrix2x3
Der Typ „QMatrix2x3“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 2 Spalten, 3 Zeilen und den Elementtyp „float“.
QMatrix2x4
Der Typ „QMatrix2x4“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 2 Spalten, 4 Zeilen und den Elementtyp „float“.
QMatrix3x2
Der Typ „QMatrix3x2“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 3 Spalten, 2 Zeilen und den Elementtyp „float“.
QMatrix3x3
Der Typ „QMatrix3x3“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 3 Spalten, 3 Zeilen und den Elementtyp „float“.
QMatrix3x4
Der Typ „QMatrix3x4“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 3 Spalten, 4 Zeilen und den Elementtyp „float“.
QMatrix4x2
Der Typ „QMatrix4x2“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 4 Spalten, 2 Zeilen und den Elementtyp „float“.
QMatrix4x3
Der Typ „QMatrix4x3“ definiert eine praktische Instanziierung der Vorlage „ QGenericMatrix “ für 4 Spalten, 3 Zeilen und den Elementtyp „float“.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator*(T factor, const QGenericMatrix<N, M, T> &matrix)
Gibt das Ergebnis der Multiplikation aller Elemente von N x M matrix mit factor zurück.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator*(const QGenericMatrix<N, M, T> &matrix, T factor)
Gibt das Ergebnis der Multiplikation aller Elemente von ` matrix ` mit ` factor` zurück.
template < int NN, int M1, int M2, typename TT > QGenericMatrix<M1, M2, TT> operator*(const QGenericMatrix<NN, M2, TT> &m1, const QGenericMatrix<M1, NN, TT> &m2)
Gibt das Produkt der Matrix „ NN “ × „ M2 “ ( m1 ) und der Matrix „ M1 “ × „ NN “ ( m2 ) zurück, wodurch eine Matrix „ M1 “ × „ M2 “ als Ergebnis entsteht.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator+(const QGenericMatrix<N, M, T> &m1, const QGenericMatrix<N, M, T> &m2)
Gibt die Summe der N x M -Matrizen m1 und m2 zurück.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T> &m1, const QGenericMatrix<N, M, T> &m2)
Gibt die Differenz der N x M -Matrizen m1 und m2 zurück.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T> &matrix)
Gibt die Negation von ` matrix` zurück.
Dies ist eine überladene Funktion.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator/(const QGenericMatrix<N, M, T> &matrix, T divisor)
Gibt das Ergebnis der Division aller Elemente von N x M matrix durch divisor zurück.
template < int N, int M, typename T > QDataStream &operator<<(QDataStream &stream, const QGenericMatrix<N, M, T> &matrix)
Schreibt die angegebenen Werte „ N “ und „ M “ sowie „ matrix “ in den angegebenen „ stream “ und gibt eine Referenz auf den Stream zurück.
Siehe auch „Serialisierung vonQt-Datentypen“.
template < int N, int M, typename T > QDataStream &operator>>(QDataStream &stream, QGenericMatrix<N, M, T> &matrix)
Liest eine Matrix der Größe N x M aus der angegebenen Datei „ stream “ in die angegebene Datei „ matrix “ ein und gibt eine Referenz auf den Stream zurück.
Siehe auch „Serialisierung vonQt-Datentypen“.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.