matrix4x4 QML Value Type
4×4行列とは、4行4列からなる行列のことです。詳細…
| Import Statement: | import QtQuick |
詳細な説明
matrix4x4 型には16個の値があり、QMLではm11 からm44 までのプロパティ(行/列順)を介してそれぞれにアクセスできます。 この型の値は、Qt.matrix4x4() 関数を使用して生成できます。matrix4x4 内の各属性は実数(ARM では単精度、x86 では倍精度)として格納されます。
matrix4x4 型のプロパティのデフォルト値は単位行列であり、その対角要素m11 、m22 、m33 、m44 はすべて1 であり、その他の成分はすべて0 となります。
matrix4x4 型には、QML 内で呼び出すことができる以下の冪等関数があります:
| 関数のシグネチャ | 説明 | 例 |
|---|---|---|
| translate(vector3d vector) | this の4×4行列に、rotate(real angle, vector3d axis)の成分を用いて座標を平行移動させる別の行列を乗算します。vector | |
| rotate(real angle, vector3d axis) | this の4×4行列に、座標をangle の成分分だけ平行移動させる別の行列を乗算します。rotate(real angle, vector3d axis) の4×4行列に、座標を 度、軸axisを中心に回転させる別の行列を乗算します。axis | |
| rotate(quaternion quaternion) | this の4x4行列に、指定されたquaternion に従って座標を回転させる別の行列を乗算します。quaternion は正規化されているものとみなされます。 | |
| scale(実数因子) | this の4x4行列に、指定された に従って座標をスケーリングする別の行列を乗算します。 は正規化されているものとみなされます。scale(real factor)factor | |
| scale(実数 x, 実数 y, 実数 z) | this の4x4行列に、座標を成分x 、y 、およびz | |
| scale(vector3d vector) | this の4x4行列に、成分 、 、およびvector | |
| lookAt(vector3d eye, vector3d center, vector3d up) | this の4x4行列に、eye の点から導出された視点行列を乗算します。center のvector3dは、eye が向いている視界の中心を示します。up のvector3dは、eye を基準として、どの方向を「上」とみなすべきかを示します。 | |
| matrix4x4 times(matrix4x4 other) | this のmatrix4x4とother のmatrix4x4を乗算した結果のmatrix4x4を返します。 | |
| vector4d times(vector4d vector) | vector を、this の4x4行列に従って変換した結果の4次元ベクトルを返します。この行列はベクトルに事前適用されます。 | |
| vector3d times(vector3d vector) | vector を、this matrix4x4 に従って変換した結果の vector3d を返します。行列はベクトルの前に適用されます。vector3d times(vector3d vector) | |
| matrix4x4 times(real factor) | this matrix4x4 にスカラーを乗算した結果の matrix4x4 を返します。factor | |
| matrix4x4 plus(matrix4x4 other) | this の行列4x4とother の行列4x4を加算した結果の行列4x4を返します | |
| matrix4x4 minus(matrix4x4 other) | other 行列4x4からthis 行列4x4を引いた結果の行列4x4を返します。 | |
| vector4d row(int which) | which で指定されたthis の行の vector4d を返します。注:which は、行列への 0 を基点とするアクセスです。 | |
| vector4d column(int which) | which で指定されたthis の vector4d 行を返します。注:which は、行列への 0 を基点とするアクセスです。 | |
| real determinant() | this matrix4x4 の行列式を返します。 | |
| matrix4x4 inverted() | this matrix4x4 の逆行列が存在する場合、それを返し、存在しない場合は単位行列を返します。 | |
| matrix4x4 transposed() | this matrix4x4 の転置を返します。 | |
| rect mapRect(rect) | 指定された矩形を、この行列で定義された座標系にマッピングします。回転やせん断が指定されている場合、この関数はバウンディング矩形を返します。この関数は Qt 6.5 で導入されました。 | |
| point map(point) | 指定された点を、この行列によって定義される座標系にマッピングします。この関数は Qt 6.5 で導入されました。 | |
| bool fuzzyEquals(matrix4x4 other, real epsilon) | this のmatrix4x4がother のmatrix4x4と近似的に等しい場合、trueを返します。この近似が真となるのは、this の各属性が、other の対応する属性からepsilon 以内の範囲にある場合です。なお、epsilon はオプションの引数であり、デフォルトのepsilon は0.00001です。 | |
この値型は、QtQuick インポートによって提供されます。
「QML 値型」も参照してください 。
© 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.