QAbstractAspect Class

class Qt3DCore::QAbstractAspect

QAbstractAspectは、垂直方向の動作を提供するアスペクトの基本クラスです。詳細...

ヘッダー #include <Qt3DCore/QAbstractAspect>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3DCore)
target_link_libraries(mytarget PRIVATE Qt6::3DCore)
qmake: QT += 3dcore
を継承する: QObject
によって継承される:

Qt3DAnimation::QAnimationAspect,Qt3DInput::QInputAspect,Qt3DLogic::QLogicAspect, andQt3DRender::QRenderAspect

ステータス非推奨

パブリック関数

QAbstractAspect(QObject *parent = nullptr)

保護された関数

void registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor)
void registerBackendType(const QMetaObject &obj, const Qt3DCore::QBackendNodeMapperPtr &functor)
Qt3DCore::QNodeId rootEntityId() const

マクロ

QT3D_REGISTER_ASPECT(name, AspectType)

詳細説明

メンバ関数ドキュメント

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

を持つ新しい QAbstractAspect を構築します。parent

[protected] template <typename Frontend> void QAbstractAspect::registerBackendType(const Qt3DCore::QBackendNodeMapperPtr &functor)

バックエンドをfunctor に登録する。

[protected] void QAbstractAspect::registerBackendType(const QMetaObject &obj, const Qt3DCore::QBackendNodeMapperPtr &functor)

バックエンドをobjfunctor に登録する。

[noexcept protected] Qt3DCore::QNodeId QAbstractAspect::rootEntityId() const

ルートエンティティノード ID を返します。

関連する非会員

QAspectJobPtr

QAspectJob の共有ポインター。

QBackendNodeMapperPtr

QBackendNodeMapper の共有ポインタ。

マクロドキュメント

QT3D_REGISTER_ASPECT(name, AspectType)

現在設定されているQt3DCore::QAspectFactoryによるインスタンス化のためにAspectType を登録するための便利なマクロです。これにより、後でnameQt3DCore::QAspectEngine::registerAspect(constQString &name) に渡すことで、アスペクトスレッドでAspectType のインスタンスを作成することができます。

注意: このマクロを使用せずに、Qt3DCore::QAspectEngine::registerAspect(QAbstractAspect *aspect) を使用して新しいアスペクトを登録することも可能です。このマクロは、以前に作成したアスペクトのインスタンスをアスペクトスレッドのコンテキストに移動する処理を行います。

KDABは、カスタムQt3Dアスペクトの作成に関するいくつかの記事をブログに公開しています。アスペクトについてもっと学びたい場合は、これらの記事から始めるとよいでしょう。

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