QGenericMatrix Class
template <int N, int M, typename T> class QGenericMatrixQGenericMatrix 클래스는 N개의 열과 M개의 행을 가진 N × M 변환 행렬을 나타내는 템플릿 클래스입니다. 더 보기...
| 헤더: | #include <QGenericMatrix> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
- 상속된 멤버를 포함한 모든 멤버 목록
- QGenericMatrix는 ‘3D 페인팅 클래스 및 렌더링’의 일부입니다.
공개 함수
| 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 |
관련 비멤버
| 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) |
QMatrix4x4도 참조하십시오 .
멤버 함수 문서
QGenericMatrix::QGenericMatrix()
N × M 크기의 단위 행렬을 생성합니다.
[explicit] QGenericMatrix::QGenericMatrix(const T *values)
주어진 N * M 부동소수점 values 로부터 행렬을 생성합니다. 배열 values 의 내용은 행 우선 순서로 되어 있는 것으로 가정합니다.
copyDataTo()도 참조하십시오 .
const T *QGenericMatrix::constData() const
이 행렬의 원시 데이터에 대한 상수 포인터를 반환합니다.
data()도 참조하십시오 .
void QGenericMatrix::copyDataTo(T *values) const
이 행렬에서 N * M 항목을 가져와 행 우선 순서(row-major order)로 values 에 복사합니다.
T *QGenericMatrix::data()
이 행렬의 원시 데이터에 대한 포인터를 반환합니다.
constData()도 참조하십시오 .
const T *QGenericMatrix::data() const
이 행렬의 원시 데이터에 대한 상수 포인터를 반환합니다.
constData()도 참조하십시오 .
void QGenericMatrix::fill(T value)
이 행렬의 모든 요소를 value 로 채웁니다.
bool QGenericMatrix::isIdentity() const
이 행렬이 단위 행렬이면 true 을 반환하고, 그렇지 않으면 false를 반환합니다.
setToIdentity()도 참조하십시오 .
void QGenericMatrix::setToIdentity()
이 행렬을 단위 행렬로 설정합니다.
isIdentity()도 참조하십시오 .
QGenericMatrix<M, N, T> QGenericMatrix::transposed() const
이 행렬을 대각선을 기준으로 전치한 행렬을 반환합니다.
bool QGenericMatrix::operator!=(const QGenericMatrix<N, M, T> &other) const
이 행렬이 other 와 동일하지 않은 경우 true 를 반환하고, 그렇지 않은 경우 false를 반환합니다.
T &QGenericMatrix::operator()(int row, int column)
이 행렬의 (row, column) 위치에 있는 요소에 대한 참조를 반환하여, 해당 요소에 값을 할당할 수 있도록 합니다.
const T &QGenericMatrix::operator()(int row, int column) const
이 행렬에서 (row, column) 위치에 있는 요소에 대한 상수 참조를 반환합니다.
QGenericMatrix<N, M, T> &QGenericMatrix::operator*=(T factor)
이 행렬의 모든 원소에 factor 를 곱합니다.
QGenericMatrix<N, M, T> &QGenericMatrix::operator+=(const QGenericMatrix<N, M, T> &other)
other 의 내용을 이 행렬에 더합니다.
QGenericMatrix<N, M, T> &QGenericMatrix::operator-=(const QGenericMatrix<N, M, T> &other)
이 행렬에서 other 의 내용을 뺍니다.
QGenericMatrix<N, M, T> &QGenericMatrix::operator/=(T divisor)
이 행렬의 모든 원소를 divisor 로 나눕니다.
bool QGenericMatrix::operator==(const QGenericMatrix<N, M, T> &other) const
이 행렬이 other 와 동일하면 true 를 반환하고, 그렇지 않으면 false를 반환합니다.
관련 비회원
QMatrix2x2
QMatrix2x2 유형은 열 2개, 행 2개, 요소 유형으로 float를 갖는 ` QGenericMatrix ` 템플릿의 편리한 인스턴스를 정의합니다.
QMatrix2x3
QMatrix2x3 유형은 2개의 열, 3개의 행, 그리고 요소 유형으로 float를 갖는 QGenericMatrix 템플릿의 편리한 인스턴스를 정의합니다.
QMatrix2x4
QMatrix2x4 유형은 2열, 4행, 요소 유형으로 float를 갖는 QGenericMatrix 템플릿의 편리한 인스턴스를 정의합니다.
QMatrix3x2
QMatrix3x2 유형은 3개의 열, 2개의 행, 요소 유형으로 float를 갖는 ` QGenericMatrix ` 템플릿의 편리한 인스턴스를 정의합니다.
QMatrix3x3
QMatrix3x3 유형은 3개의 열, 3개의 행, 그리고 요소 유형으로 float를 갖는 ` QGenericMatrix ` 템플릿의 편리한 인스턴스를 정의합니다.
QMatrix3x4
QMatrix3x4 유형은 3개의 열, 4개의 행, 그리고 요소 유형으로 float를 갖는 ` QGenericMatrix ` 템플릿의 편리한 인스턴스를 정의합니다.
QMatrix4x2
QMatrix4x2 유형은 4개의 열, 2개의 행, 요소 유형으로 float를 갖는 ` QGenericMatrix ` 템플릿의 편리한 인스턴스를 정의합니다.
QMatrix4x3
QMatrix4x3 유형은 4개의 열, 3개의 행, 그리고 요소 유형으로 float를 갖는 ` QGenericMatrix ` 템플릿의 편리한 인스턴스를 정의합니다.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator*(T factor, const QGenericMatrix<N, M, T> &matrix)
N 의 모든 요소와 M matrix 의 모든 요소를 factor 로 곱한 결과를 반환합니다.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator*(const QGenericMatrix<N, M, T> &matrix, T factor)
matrix 의 모든 요소를 factor 로 곱한 결과를 반환합니다.
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)
NN × M2 행렬 m1 과 M1 × NN 행렬 m2 의 곱을 반환하여, M1 × M2 행렬의 결과를 생성합니다.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator+(const QGenericMatrix<N, M, T> &m1, const QGenericMatrix<N, M, T> &m2)
N 와 M 행렬인 m1 및 m2 의 합을 반환합니다.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T> &m1, const QGenericMatrix<N, M, T> &m2)
N 와 M 행렬인 m1 및 m2 의 차이를 반환합니다.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator-(const QGenericMatrix<N, M, T> &matrix)
matrix 의 부정을 반환합니다.
이 함수는 오버로드된 함수입니다.
template < int N, int M, typename T > QGenericMatrix<N, M, T> operator/(const QGenericMatrix<N, M, T> &matrix, T divisor)
N 와 M, matrix 의 모든 요소를 divisor 로 나눈 결과를 반환합니다.
template < int N, int M, typename T > QDataStream &operator<<(QDataStream &stream, const QGenericMatrix<N, M, T> &matrix)
지정된 N x M matrix 를 지정된 stream 에 기록하고, 해당 스트림에 대한 참조를 반환합니다.
Qt 데이터 유형 직렬화항목도 참조하십시오 .
template < int N, int M, typename T > QDataStream &operator>>(QDataStream &stream, QGenericMatrix<N, M, T> &matrix)
지정된 stream 에서 N x M 행렬을 지정된 matrix 로 읽어들이고, 해당 스트림에 대한 참조를 반환합니다.
Qt 데이터 유형의 직렬화항목도 참조하십시오 .
© 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.