Qt3DAnimation::QMorphingAnimation Class
class Qt3DAnimation::QMorphingAnimation블렌드 셰이프 모핑 애니메이션을 구현하는 클래스입니다. 더 보기...
| 헤더: | #include <qmorphinganimation.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
| qmake: | QT += 3danimation |
| QML에서: | MorphingAnimation |
| 상속: | Qt3DAnimation::QAbstractAnimation |
| 상태: | 기술 미리보기 |
이 클래스는 기술 미리보기 단계에 있으며 변경될 수 있습니다.
공개 유형
| enum | Method { Normalized, Relative } |
속성
|
|
공개 함수
| QMorphingAnimation(QObject *parent = nullptr) | |
| void | addMorphTarget(Qt3DAnimation::QMorphTarget *target) |
| QEasingCurve | easing() const |
| QVector<float> | getWeights(int positionIndex) |
| float | interpolator() const |
| Qt3DAnimation::QMorphingAnimation::Method | method() const |
| QVector<Qt3DAnimation::QMorphTarget *> | morphTargetList() |
| void | removeMorphTarget(Qt3DAnimation::QMorphTarget *target) |
| void | setMorphTargets(const QVector<Qt3DAnimation::QMorphTarget *> &targets) |
| void | setWeights(int positionIndex, const QVector<float> &weights) |
| Qt3DRender::QGeometryRenderer * | target() const |
| QString | targetName() const |
| QVector<float> | targetPositions() const |
공개 슬롯
| void | setEasing(const QEasingCurve &easing) |
| void | setMethod(Qt3DAnimation::QMorphingAnimation::Method method) |
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
| void | setTargetName(const QString name) |
| void | setTargetPositions(const QVector<float> &targetPositions) |
신호
| void | easingChanged(const QEasingCurve &easing) |
| void | interpolatorChanged(float interpolator) |
| void | methodChanged(Qt3DAnimation::QMorphingAnimation::Method method) |
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
| void | targetNameChanged(const QString &name) |
| void | targetPositionsChanged(const QVector<float> &targetPositions) |
상세 설명
Qt3DAnimation::QMorphingAnimation 클래스는 대상 QGeometryRenderer 에 대한 블렌드 셰이프 모핑 애니메이션을 구현합니다. QMorphingAnimation은 morph targets 의 올바른 QAttributes 를 대상 QGeometryRenderer::geometry 에 설정하고 현재 위치에 대한 보간기를 계산합니다. 속성 간의 실제 블렌딩은 머티리얼에서 구현되어야 합니다. Qt3DAnimation::QMorphPhongMaterial은 폰(Phong) 라이팅 모델에 대한 모핑을 지원하는 머티리얼을 구현합니다. 블렌딩은 'base'와 'target'이라는 두 속성 간에 이루어집니다. 베이스 및 타겟 속성의 이름은 모프 타겟 이름에서 가져오며, 베이스 속성은 기존 이름을 그대로 유지하고 타겟 속성 이름에는 'Target'이 접미사로 추가됩니다. 보간기는 사용된 머티리얼의 QParameter 로 설정할 수 있습니다. 애니메이션의 모든 모프 타겟은 베이스 지오메트리에 있는 속성과 동일한 이름을 가진 속성을 포함해야 합니다.
멤버 유형 문서
enum QMorphingAnimation::Method
이 열거형은 모핑 방법을 지정합니다.
| 상수 | 값 | 설명 |
|---|---|---|
Qt3DAnimation::QMorphingAnimation::Normalized | 0 | 블렌딩에는 정규화된 공식 V' = Vbase * (1.0 - sum(Wi)) + sum[Vi * Wi]를 사용해야 합니다. |
Qt3DAnimation::QMorphingAnimation::Relative | 1 | 블렌딩에는 상대적 공식(V' = Vbase + sum[Vi * Wi])을 사용해야 합니다. |
속성 설명
easing : QEasingCurve
모프 타깃 간의 보간기의 이징 곡선을 저장합니다.
액세스 함수:
| QEasingCurve | easing() const |
| void | setEasing(const QEasingCurve &easing) |
알림 신호:
| void | easingChanged(const QEasingCurve &easing) |
[read-only] interpolator : float
기본 속성과 대상 속성 간의 보간값을 저장합니다.
액세스 함수:
| float | interpolator() const |
알림 신호:
| void | interpolatorChanged(float interpolator) |
method : Method
모핑 방식을 지정합니다. 기본값은 ‘Relative’입니다.
액세스 함수:
| Qt3DAnimation::QMorphingAnimation::Method | method() const |
| void | setMethod(Qt3DAnimation::QMorphingAnimation::Method method) |
알림 신호:
| void | methodChanged(Qt3DAnimation::QMorphingAnimation::Method method) |
target : Qt3DRender::QGeometryRenderer*
모핑 애니메이션이 적용되는 대상 QGeometryRenderer를 보유합니다.
액세스 함수:
| Qt3DRender::QGeometryRenderer * | target() const |
| void | setTarget(Qt3DRender::QGeometryRenderer *target) |
Notifier 신호:
| void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
targetName : QString
대상 지오메트리의 이름을 저장합니다. 이 속성은 대상 지오메트리를 모핑 애니메이션과 더 쉽게 매칭할 수 있도록 도와주는 편의 속성입니다. 이 이름은 일반적으로 대상 QGeometryRenderer의 상위 엔티티 이름과 동일하지만, 반드시 그럴 필요는 없습니다.
액세스 함수:
| QString | targetName() const |
| void | setTargetName(const QString name) |
Notifier 신호:
| void | targetNameChanged(const QString &name) |
targetPositions : QVector<float>
모프 타깃의 위치 값을 저장합니다. 목록의 각 위치는 동일한 인덱스를 가진 해당 모프 타깃의 위치를 지정합니다. 값은 오름차순으로 정렬되어야 합니다. 값은 양수이거나 음수일 수 있으며, 미리 정의된 단위는 없습니다.
액세스 함수:
| QVector<float> | targetPositions() const |
| void | setTargetPositions(const QVector<float> &targetPositions) |
알림 신호:
| void | targetPositionsChanged(const QVector<float> &targetPositions) |
멤버 함수 문서
[explicit] QMorphingAnimation::QMorphingAnimation(QObject *parent = nullptr)
parent 를 사용하여 새로운 QMorphingAnimation을 생성합니다.
void QMorphingAnimation::addMorphTarget(Qt3DAnimation::QMorphTarget *target)
애니메이션 끝에 새로운 모프 target 를 추가하세요.
QVector<float> QMorphingAnimation::getWeights(int positionIndex)
positionIndex 에서 모프 가중치를 반환합니다.
QVector<Qt3DAnimation::QMorphTarget *> QMorphingAnimation::morphTargetList()
모프 대상 목록을 반환합니다.
void QMorphingAnimation::removeMorphTarget(Qt3DAnimation::QMorphTarget *target)
애니메이션에서 ‘ target ’ 모프를 제거하세요.
void QMorphingAnimation::setMorphTargets(const QVector<Qt3DAnimation::QMorphTarget *> &targets)
targets 의 모프를 애니메이션으로 설정합니다. 기존 타깃은 모두 지워집니다.
void QMorphingAnimation::setWeights(int positionIndex, const QVector<float> &weights)
positionIndex 에서 ‘ weights ’의 변형 세트를 설정합니다.
© 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.