QMorphingAnimation Class

class Qt3DAnimation::QMorphingAnimation

ブレンドシェイプ・モーフィング・アニメーションを実装したクラス。もっと詳しく...

ヘッダー #include <QMorphingAnimation>
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 からターゲットQGeometryRenderer::geometry に正しいQAttributes を設定し、現在の位置の補間子を計算します。属性間の実際のブレンドは、マテリアルで実装する必要があります。Qt3DAnimation::QMorphPhongMaterialは、フォンの照明モデルのためのモーフィングサポートを持つマテリアルを実装しています。ブレンドは、2つの属性 - 'base' と 'target' - の間で行われます。base 属性と target 属性の名前はモーフターゲットの名前から取られ、base 属性は既に持っている名前を保持し、target 属性の名前には 'Target' が付加されます。インターポレータは、使用するマテリアルにQParameter として設定できます。アニメーション内のすべてのモーフターゲットは、ベースジオメトリのアトリビュートと同じ名前のアトリビュートを含む必要があります。

メンバタイプのドキュメント

enum QMorphingAnimation::Method

この列挙はモーフィング方法を指定する。

定数説明
Qt3DAnimation::QMorphingAnimation::Normalized0ブレンドは正規化された式を使用する; V' = Vbase * (1.0 - sum(Wi))+ sum[Vi * Wi]
Qt3DAnimation::QMorphingAnimation::Relative1ブレンディングは相対式を使用する; 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

モーフィング方法を保持する。デフォルトは 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)

通知シグナル

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)

モーフweightspositionIndex に設定する。

© 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.