Qt3DCore::QAbstractAspect Class
class Qt3DCore::QAbstractAspectQAbstractAspect は、動作の垂直スライスを提供するアスペクトの基底クラスです。詳細...
| ヘッダー: | #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 、およびQt3DRender::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)
obj およびfunctor にバックエンドを登録します。
[noexcept protected] Qt3DCore::QNodeId QAbstractAspect::rootEntityId() const
ルートエンティティノードのIDを返します。
マクロのドキュメント
QT3D_REGISTER_ASPECT(name, AspectType)
現在設定されている Qt3DCore::QAspectFactory によってインスタンス化されるよう、AspectType を登録するための便利なマクロです。これにより、後でname をQt3DCore::QAspectEngine::registerAspect(constQString &name) に渡すことで、アスペクトスレッド内でAspectType のインスタンスを作成することが可能になります。
注: このマクロを使用せずに、Qt3DCore::QAspectEngine::registerAspect(QAbstractAspect *aspect) を使用して新しいアスペクトを登録することも可能です。 この場合、以前に作成されたアスペクトインスタンスがアスペクトスレッドコンテキストへ移動される処理が行われます。
KDABは、ブログ上でカスタムQt3Dアスペクトの作成に関する記事をいくつか公開しています。これらは、このテーマについてさらに詳しく学びたい方にとって、素晴らしい出発点となります。
© 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.