QMorphTarget Class

class Qt3DAnimation ::QMorphTarget

A class providing morph targets to blend-shape animation. 更多...

头: #include <QMorphTarget>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3danimation)
target_link_libraries(mytarget PRIVATE Qt6::3danimation)
qmake: QT += 3danimation
实例化: MorphTarget
继承: QObject

特性

公共函数

QMorphTarget (QObject * parent = nullptr)
void addAttribute (Qt3DCore::QAttribute * 属性 )
QList<Qt3DCore::QAttribute *> attributeList () const
QStringList attributeNames () const
void removeAttribute (Qt3DCore::QAttribute * 属性 )
void setAttributes (const QList<Qt3DCore::QAttribute *> & 属性 )

信号

void attributeNamesChanged (const QStringList & attributeNames )

静态公共成员

Qt3DAnimation::QMorphTarget * fromGeometry (Qt3DCore::QGeometry * geometry , const QStringList & 属性 )

详细描述

A Qt3DAnimation::QMorphTarget class is a convenience class, which provides a list of QAttributes , which the QMorphingAnimation uses to animate geometry. A QMorphTarget can also be created based on existing Qt3DCore::QGeometry .

特性文档编制

[read-only] attributeNames : const QStringList

Holds a list of attribute names contained in the morph target.

访问函数:

QStringList attributeNames () const

通知程序信号:

void attributeNamesChanged (const QStringList & attributeNames )

成员函数文档编制

[explicit] QMorphTarget:: QMorphTarget ( QObject * parent = nullptr)

Constructs a QMorphTarget with given parent .

void QMorphTarget:: addAttribute ( Qt3DCore::QAttribute * 属性 )

添加 attribute the morph target. An attribute with the same name must not have been added previously to the morph target.

QList < Qt3DCore::QAttribute *> QMorphTarget:: attributeList () const

Returns a list of attributes contained in the morph target.

[static invokable] Qt3DAnimation::QMorphTarget *QMorphTarget:: fromGeometry ( Qt3DCore::QGeometry * geometry , const QStringList & 属性 )

Returns a morph target based on the attributes 以给定 geometry .

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .

void QMorphTarget:: removeAttribute ( Qt3DCore::QAttribute * 属性 )

Removes an attribute from the morph target.

void QMorphTarget:: setAttributes (const QList < Qt3DCore::QAttribute *> & 属性 )

设置 attributes to the morph target. Old attributes are cleared.