QMorphingAnimation Class
class Qt3DAnimation::QMorphingAnimation블렌드 셰이프 모핑 애니메이션을 구현하는 클래스입니다. 더 보기...
Header: | #include <QMorphingAnimation> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3danimation) target_link_libraries(mytarget PRIVATE Qt6::3danimation) |
qmake: | QT += 3danimation |
QML에서: | MorphingAnimation |
상속합니다: | Qt3DAnimation::QAbstractAnimation |
상태: | Deprecated |
공용 유형
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 에서 대상 QGeometryRenderer::geometry 으로 올바른 QAttributes 을 설정하고 현재 위치에 대한 보간기를 계산합니다. 속성 간의 실제 블렌딩은 머티리얼에서 구현해야 합니다. Qt3디애니메이션::Q모프퐁 머티리얼은 퐁 조명 모델에 대한 모핑을 지원하는 머티리얼을 구현합니다. 블렌딩은 '베이스'와 '타깃'이라는 두 가지 어트리뷰트 사이에서 이루어집니다. 베이스 및 타깃 어트리뷰트의 이름은 모프 타깃 이름에서 가져오는데, 베이스 어트리뷰트는 이미 가지고 있는 이름을 유지하고 타깃 어트리뷰트 이름에 '타깃'이 추가됩니다. 보간기는 사용된 머티리얼에 QParameter 로 설정할 수 있습니다. 애니메이션의 모든 모프 타깃은 베이스 지오메트리의 어트리뷰트와 이름이 같은 어트리뷰트를 포함해야 합니다.
멤버 유형 문서
enum QMorphingAnimation::Method
이 열거형은 모핑 메서드를 지정합니다.
Constant | 값 | 설명 |
---|---|---|
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 : const float
기본 속성과 대상 속성 사이의 보간기를 보유합니다.
함수에 액세스합니다:
float | interpolator() const |
알림 신호:
void | interpolatorChanged(float interpolator) |
method : Method
모핑 메서드를 보유합니다. 기본값은 상대입니다.
함수에 액세스합니다:
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) |
알림 신호:
void | targetChanged(Qt3DRender::QGeometryRenderer *target) |
targetName : QString
대상 지오메트리의 이름을 보유합니다. 이는 대상 지오메트리를 모핑 애니메이션에 쉽게 일치시킬 수 있는 편의 속성입니다. 이름은 일반적으로 대상 QGeometryRenderer의 부모 엔티티의 이름과 동일하지만, 반드시 일치할 필요는 없습니다.
함수에 액세스합니다:
QString | targetName() const |
void | setTargetName(const QString name) |
알림 신호:
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 를 설정합니다.
© 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.