QComputeCommand Class
class Qt3DRender::QComputeCommandGPU上のコンピュートシェーダーのための作業を発行するQComponent。さらに...
ヘッダー | #include <QComputeCommand> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake | QT += 3drender |
QML で | ComputeCommand |
を継承しています: | Qt3DCore::QComponent |
ステータス | 非推奨 |
プロパティ
- runType : RunType
- workGroupX : int
- workGroupY : int
- workGroupZ : int
パブリック機能
QComputeCommand(Qt3DCore::QNode *parent = nullptr) | |
Qt3DRender::QComputeCommand::RunType | runType() const |
int | workGroupX() const |
int | workGroupY() const |
int | workGroupZ() const |
パブリックスロット
void | setRunType(Qt3DRender::QComputeCommand::RunType runType) |
void | setWorkGroupX(int workGroupX) |
void | setWorkGroupY(int workGroupY) |
void | setWorkGroupZ(int workGroupZ) |
void | trigger(int frameCount = 1) |
void | trigger(int workGroupX, int workGroupY, int workGroupZ, int frameCount = 1) |
シグナル
void | runTypeChanged() |
void | workGroupXChanged() |
void | workGroupYChanged() |
void | workGroupZChanged() |
詳細説明
Qt3DRender::QComputeCommand は、コンピュートシェーダのための作業を発行するために使用されます。コンピュートシェーダは、QComputeCommandが追加されたエンティティのQMaterial コンポーネントで指定されます。workGroupX 、workGroupY 、workGroupZ プロパティは、コンピュートシェーダ呼び出しのためのワークグループサイズを指定します。Qt3DRender::QDispatchCompute ノードは、実際にコマンドを発行するためにFrameGraphに存在する必要があります。
注: レンダリングポリシーがQt3DRender::QRenderSettings::OnDemand に設定され、シーンに変更がない場合、ComputeCommand は繰り返し呼び出されません。新しいフレームをレンダリングするトリガーとなるシーンへの他の変更がない場合、ComputeCommand が繰り返し呼び出されるためには、Qt3DRender::QRenderSettings::Always レンダリングポリシーが設定されている必要があります。
プロパティ ドキュメント
runType : RunType
Computeコマンドを毎フレーム実行するか、手動でトリガーするかを指定します。
Continuousに設定すると、Computeコマンドは毎フレーム実行される。これがデフォルトです。
Manual に設定すると、CompouteCommand は指定されたフレーム数実行され、その後コンポーネントは無効化されます。
アクセス機能:
Qt3DRender::QComputeCommand::RunType | runType() const |
void | setRunType(Qt3DRender::QComputeCommand::RunType runType) |
通知シグナル
void | runTypeChanged() |
workGroupX : int
Xワークグループのサイズを指定します。
アクセス機能
int | workGroupX() const |
void | setWorkGroupX(int workGroupX) |
通知シグナル
void | workGroupXChanged() |
workGroupY : int
Yワークグループのサイズを指定します。
アクセス機能
int | workGroupY() const |
void | setWorkGroupY(int workGroupY) |
ノーティファイア信号
void | workGroupYChanged() |
workGroupZ : int
Zワークグループのサイズを指定します。
アクセス機能
int | workGroupZ() const |
void | setWorkGroupZ(int workGroupZ) |
通知シグナル
void | workGroupZChanged() |
メンバー関数ドキュメント
[explicit]
QComputeCommand::QComputeCommand(Qt3DCore::QNode *parent = nullptr)
コンストラクタは、指定されたparent で新しいQt3DRender::QComputeCommand インスタンスを作成します。
[slot]
void QComputeCommand::setWorkGroupX(int workGroupX)
最初のディメンジョンのワークグループをworkGroupX に設定します。
注釈 workGroupX プロパティのセッタ関数。
workGroupX()も参照して ください。
[slot]
void QComputeCommand::setWorkGroupY(int workGroupY)
2つ目の次元のワークグループをworkGroupY に設定する。
注釈 プロパティのセッター関数workGroupY 。
workGroupY()も参照して ください。
[slot]
void QComputeCommand::setWorkGroupZ(int workGroupZ)
3次元目のワークグループをworkGroupZ に設定する。
注釈: プロパティのセッター関数workGroupZ 。
workGroupZ()も参照 。
[slot]
void QComputeCommand::trigger(int frameCount = 1)
実行タイプがManualに設定されている場合、トリガーを呼び出すと、次のframeCount フレームの間、計算コマンドが実行されます。実行が完了すると、enabledプロパティはfalseに設定されます。
[slot]
void QComputeCommand::trigger(int workGroupX, int workGroupY, int workGroupZ, int frameCount = 1)
実行タイプがManualに設定されている場合、トリガーを呼び出すと、次のframeCount フレームの間、計算コマンドが実行されます。実行が完了すると、enabledプロパティはfalseに設定される。以前に設定されたワークグループのサイズは、workGroupX,workGroupY,workGroupZ で上書きされる。
© 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.