QTransform Class
class Qt3DCore::QTransformメッシュに対して変換を実行するために使用する。詳細...
ヘッダー | #include <QTransform> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
qmake | QT += 3dcore |
QML で | Transform |
を継承しています: | Qt3DCore::QComponent |
ステータス | 非推奨 |
プロパティ
|
パブリック機能
QTransform(Qt3DCore::QNode *parent = nullptr) | |
QMatrix4x4 | matrix() const |
QQuaternion | rotation() const |
float | rotationX() const |
float | rotationY() const |
float | rotationZ() const |
float | scale() const |
QVector3D | scale3D() const |
QVector3D | translation() const |
QMatrix4x4 | worldMatrix() const |
パブリックスロット
void | setMatrix(const QMatrix4x4 &matrix) |
void | setRotation(const QQuaternion &rotation) |
void | setRotationX(float rotationX) |
void | setRotationY(float rotationY) |
void | setRotationZ(float rotationZ) |
void | setScale(float scale) |
void | setScale3D(const QVector3D &scale) |
void | setTranslation(const QVector3D &translation) |
シグナル
void | matrixChanged() |
void | rotationChanged(const QQuaternion &rotation) |
void | rotationXChanged(float rotationX) |
void | rotationYChanged(float rotationY) |
void | rotationZChanged(float rotationZ) |
void | scale3DChanged(const QVector3D &scale) |
void | scaleChanged(float scale) |
void | translationChanged(const QVector3D &translation) |
void | worldMatrixChanged(const QMatrix4x4 &worldMatrix) |
静的パブリックメンバ
QQuaternion | fromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis) |
QQuaternion | fromAxesAndAngles(const QVector3D &axis1, float angle1, const QVector3D &axis2, float angle2) |
QQuaternion | fromAxesAndAngles(const QVector3D &axis1, float angle1, const QVector3D &axis2, float angle2, const QVector3D &axis3, float angle3) |
QQuaternion | fromAxisAndAngle(const QVector3D &axis, float angle) |
QQuaternion | fromAxisAndAngle(float x, float y, float z, float angle) |
QQuaternion | fromEulerAngles(const QVector3D &eulerAngles) |
QQuaternion | fromEulerAngles(float pitch, float yaw, float roll) |
QMatrix4x4 | rotateAround(const QVector3D &point, float angle, const QVector3D &axis) |
QMatrix4x4 | rotateFromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis) |
詳細説明
QTransformコンポーネントは、複数のQEntity'間で共有することはできません。トランスフォームは、QVector3D scale、QQuaternion rotation、QVector3D translation コンポーネントとして保持されます。トランスフォームはこの順番でメッシュに適用されます。QTransform::matrix プロパティが設定されると、これらのトランスフォーム コンポーネントに分解され、対応するシグナルが発行されます。
QTransform を設定するために、いくつかのヘルパー関数が提供されています。fromAxisAndAngle とfromAxesAndAngles を使用すると、特定の軸の周りの回転を設定でき、fromEulerAngles を使用すると、オイラー角に基づいて回転を設定でき、rotateAround を使用すると、ローカル原点に対する特定の点の周りにオブジェクトを回転させることができます。
プロパティのドキュメント
matrix : QMatrix4x4
トランスフォームのQMatrix4x4 を保持する。
注意: matrix プロパティが設定されると、並進、回転、スケールの各成分に分解されます。
アクセス関数:
QMatrix4x4 | matrix() const |
void | setMatrix(const QMatrix4x4 &matrix) |
通知シグナル:
void | matrixChanged() |
rotation : QQuaternion
変換の回転をQQuaternion として保持します。
アクセス関数:
QQuaternion | rotation() const |
void | setRotation(const QQuaternion &rotation) |
通知シグナル:
void | rotationChanged(const QQuaternion &rotation) |
rotationX : float
変換の x 回転をオイラー角として保持します。
アクセス関数:
float | rotationX() const |
void | setRotationX(float rotationX) |
通知シグナル
void | rotationXChanged(float rotationX) |
rotationY : float
変換の y 回転をオイラー角として保持します。
アクセス関数:
float | rotationY() const |
void | setRotationY(float rotationY) |
通知シグナル
void | rotationYChanged(float rotationY) |
rotationZ : float
変換の z 回転をオイラー角として保持します。
アクセス関数:
float | rotationZ() const |
void | setRotationZ(float rotationZ) |
通知シグナル
void | rotationZChanged(float rotationZ) |
scale : float
変換の一様なスケールを保持する。スケールがsetScale3D で設定されている場合、x 値のみを保持する。
アクセス関数:
float | scale() const |
void | setScale(float scale) |
通知シグナル:
void | scaleChanged(float scale) |
scale3D : QVector3D
変換のスケールをQVector3D として保持します。
アクセス関数:
QVector3D | scale3D() const |
void | setScale3D(const QVector3D &scale) |
通知シグナル:
void | scale3DChanged(const QVector3D &scale) |
translation : QVector3D
トランスフォームの変換をQVector3D として保持します。
アクセス関数:
QVector3D | translation() const |
void | setTranslation(const QVector3D &translation) |
通知シグナル:
void | translationChanged(const QVector3D &translation) |
[read-only]
worldMatrix : const QMatrix4x4
トランスフォームのワールド変換行列を保持する。これは、QTransform コンポーネントが、QEntity によって参照されていると仮定する。 これにより、サブツリーのQEntity 部分が、そのローカル変換が変更されていなくても、ワールド内で変換されたときを識別することがより便利になる。
アクセス関数:
QMatrix4x4 | worldMatrix() const |
Notifierシグナル:
void | worldMatrixChanged(const QMatrix4x4 &worldMatrix) |
メンバ関数 ドキュメント
[explicit]
QTransform::QTransform(Qt3DCore::QNode *parent = nullptr)
parent で新しい QTransform を構築する。
[static invokable]
QQuaternion QTransform::fromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis)
軸xAxis,yAxis およびzAxis から回転を定義する QQuaterniom を作成します。
Note: この関数はメタオブジェクトシステムや QML から呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QQuaternion QTransform::fromAxesAndAngles(const QVector3D &axis1, float angle1, const QVector3D &axis2, float angle2)
axis1,angle1,axis2,angle2 からQQuaternion を作成する。生成されたQQuaternion を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QQuaternion QTransform::fromAxesAndAngles(const QVector3D &axis1, float angle1, const QVector3D &axis2, float angle2, const QVector3D &axis3, float angle3)
axis1,angle1,axis2,angle2,axis3,angle3 からQQuaternion を作成する。結果のQQuaternion を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QQuaternion QTransform::fromAxisAndAngle(const QVector3D &axis, float angle)
axis とangle からQQuaternion を作成する。生成されたQQuaternion を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QQuaternion QTransform::fromAxisAndAngle(float x, float y, float z, float angle)
x,y,z,angle からQQuaternion を作成する。生成されたQQuaternion を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QQuaternion QTransform::fromEulerAngles(const QVector3D &eulerAngles)
eulerAngles からQQuaternion を作成する。生成されたQQuaternion を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QQuaternion QTransform::fromEulerAngles(float pitch, float yaw, float roll)
pitch,yaw,roll からQQuaternion を作成する。生成されたQQuaternion を返します。
注意: この関数はメタオブジェクトシステムやQMLから呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QMatrix4x4 QTransform::rotateAround(const QVector3D &point, float angle, const QVector3D &axis)
point を中心に,axis とangle から回転行列を作成する.結果としてQMatrix4x4 を返します。
注意: この関数はメタオブジェクトシステムおよび QML から呼び出すことができます。Q_INVOKABLE を参照してください。
[static invokable]
QMatrix4x4 QTransform::rotateFromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis)
軸xAxis,yAxis,zAxis から定義される回転行列を返します。
注意: この関数は、メタオブジェクトシステムおよび QML から呼び出すことができます。Q_INVOKABLE を参照してください。
QMatrix4x4 QTransform::worldMatrix() const
QEntity 階層の一部である可能性のあるQEntity によって参照された場合に、QTransform に関連付けられたワールド変換行列を返す。
注: プロパティ worldMatrix のゲッター関数。
© 2025 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.