QTransform Class
class Qt3DCore::QTransform메시에서 트랜스폼을 수행하는 데 사용됩니다. 더 보기...
Header: | #include <QTransform> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
qmake: | QT += 3dcore |
QML에서: | Transform |
상속합니다: | Qt3DCore::QComponent |
상태: | Deprecated |
속성
|
공용 기능
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 스케일, QQuaternion 회전 및 QVector3D 변환 컴포넌트로 유지됩니다. 트랜스폼은 해당 순서대로 메시에 적용됩니다. QTransform::matrix 프로퍼티가 설정되면 이러한 트랜스폼 컴포넌트로 분해되어 해당 신호가 방출됩니다.
fromAxisAndAngle 및 fromAxesAndAngles 은 특정 축을 중심으로 회전을 설정하는 데, fromEulerAngles 은 오일러 각을 기준으로 회전을 설정하는 데, rotateAround 은 로컬 원점을 기준으로 특정 점을 중심으로 오브젝트를 회전하는 데 사용할 수 있는 몇 가지 헬퍼 함수가 제공됩니다.
속성 문서
matrix : QMatrix4x4
트랜스폼의 QMatrix4x4 을 보유합니다.
참고: 행렬 속성이 설정되면 이동, 회전 및 크기 조정 구성 요소로 분해됩니다.
함수에 액세스합니다:
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 |
알림 신호:
void | worldMatrixChanged(const QMatrix4x4 &worldMatrix) |
멤버 함수 문서
[explicit]
QTransform::QTransform(Qt3DCore::QNode *parent = nullptr)
를 사용하여 새로운 QTransform을 구축합니다 parent.
[static invokable]
QQuaternion QTransform::fromAxes(const QVector3D &xAxis, const QVector3D &yAxis, const QVector3D &zAxis)
축 xAxis, yAxis 및 zAxis 에서 회전을 정의하는 QQuaterniom을 생성합니다.
참고: 이 함수는 메타 객체 시스템과 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)
axis 와 angle 에서 point 를 중심으로 회전 행렬을 생성합니다. 결과 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.