Qt3DCore::QComponent Class
class Qt3DCore::QComponentQt3DCore::QEntity インスタンスによってコンポーネントとして集約できるシーンノードの基底クラスです。詳細...
| ヘッダー: | #include <QComponent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
| qmake: | QT += 3dcore |
| QML内: | Component3D |
| 継承元: | Qt3DCore::QNode |
| 継承元: | 24 種類Qt3DAnimation::QAbstractClipAnimator、Qt3DCore::QArmature 、Qt3DCore::QBoundingVolume 、Qt3DCore::QCoreSettings 、Qt3DCore::QTransform 、Qt3DInput::QAxisAccumulator 、Qt3DInput::QInputSettings 、Qt3DInput::QKeyboardHandler 、Qt3DInput::QLogicalDevice 、Qt3DInput::QMouseHandler 、Qt3DLogic::QFrameAction 、Qt3DRender::QAbstractLight 、Qt3DRender::QAbstractRayCaster 、Qt3DRender::QCameraLens 、Qt3DRender::QComputeCommand 、Qt3DRender::QEnvironmentLight 、Qt3DRender::QLayer 、Qt3DRender::QLevelOfDetail 、Qt3DRender::QMaterial 、Qt3DRender::QObjectPicker 、Qt3DRender::QRenderSettings 、Qt3DRender::QRenderTarget 、Qt3DRender::QSceneLoader 、およびQt3DRender::QShaderData |
| ステータス: | 非推奨 |
このクラスは非推奨です。新しいコードでの使用は強く推奨しません。
プロパティ
- isShareable : bool
パブリック関数
| QComponent(Qt3DCore::QNode *parent = nullptr) | |
| QList<Qt3DCore::QEntity *> | entities() const |
| bool | isShareable() const |
パブリックスロット
| void | setShareable(bool isShareable) |
シグナル
| void | addedToEntity(Qt3DCore::QEntity *entity) |
| void | removedFromEntity(Qt3DCore::QEntity *entity) |
| void | shareableChanged(bool isShareable) |
詳細な説明
Qt3DCore::QComponent は、Qt3DCore::QEntity のインスタンスに割り当てたり、場合によってはインスタンス間で共有したりできる、動作の垂直スライスを提供します。
Qt3DCore::QComponent サブクラスは、多くの場合、集約エンティティに有用な挙動を与えるグループに集約されます。たとえば、Qt3D レンダラーアスペクトによって描画されるエンティティを実現するには、そのエンティティは、Qt3DCore::QTransform 、Qt3DRender::QMesh 、およびQt3DRender::QMaterial コンポーネントを集約することがほとんどでしょう。
Qt3DCore::QEntityも参照してください 。
プロパティのドキュメント
isShareable : bool
QComponent の共有可能フラグを保持します。QComponent は、true の場合、複数のエンティティ間で共有できます。
アクセス関数:
| bool | isShareable() const |
| void | setShareable(bool isShareable) |
Notifierシグナル:
| void | shareableChanged(bool isShareable) |
メンバ関数のドキュメント
[explicit] QComponent::QComponent(Qt3DCore::QNode *parent = nullptr)
parent を親として、新しいQComponentインスタンスを生成します。
注: QComponentを 直接インスタンス化してはなりません。代わりに、そのサブクラスのいずれかをインスタンス化してください。
[signal] void QComponent::addedToEntity(Qt3DCore::QEntity *entity)
entity に参照が追加されたことを示します。
QList<Qt3DCore::QEntity *> QComponent::entities() const
このコンポーネントを参照しているすべてのエンティティを含むQList を返します。
[signal] void QComponent::removedFromEntity(Qt3DCore::QEntity *entity)
entity から参照が削除されたことを示します。
© 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.