このページでは

Qt3DRender::QDepthTest Class

class Qt3DRender::QDepthTest

QDepthTest クラスは、フラグメントシェーダーの深度値を、書き込み先のサンプルの深度と比較して検証します。詳細...

ヘッダー: #include <qdepthtest.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
QML内: DepthTest
継承元: Qt3DRender::QRenderState
ステータス: 非推奨

このクラスは非推奨です。新しいコードでの使用は強く推奨しません。

パブリック型

enum DepthFunction { Never, Always, Less, LessOrEqual, Equal, …, NotEqual }

プロパティ

パブリック関数

QDepthTest(Qt3DCore::QNode *parent = nullptr)
Qt3DRender::QDepthTest::DepthFunction depthFunction() const

パブリックスロット

void setDepthFunction(Qt3DRender::QDepthTest::DepthFunction depthFunction)

シグナル

void depthFunctionChanged(Qt3DRender::QDepthTest::DepthFunction depthFunction)

詳細な説明

QDepthTest クラスは、指定された深度テスト関数を使用して深度テストを有効にするために使用されます。深度テストにより、テストに合格したフラグメントの色値の書き込みが可能になり、テストに不合格となったフラグメントは破棄されます。 深度テストでは、深度関数を使用して、フラグメントの深度値を z バッファの値と比較します。基になるサーフェスに z バッファがない場合、QDepthTest は何も行いません。

QAlphaTest およびQStencilTestも参照してください 。

メンバ型のドキュメント

enum QDepthTest::DepthFunction

深度関数の値の列挙

定数値説明
Qt3DRender::QDepthTest::Never0x0200深度テストに決して合格しない
Qt3DRender::QDepthTest::Always0x0207常に深度テストに合格する
Qt3DRender::QDepthTest::Less0x0201フラグメントの深度がZバッファの値より小さい場合、深度テストに合格する
Qt3DRender::QDepthTest::LessOrEqual0x0203フラグメントの深度が z バッファの値以下である場合は、深度テストに合格する
Qt3DRender::QDepthTest::Equal0x0202フラグメント深度が z バッファの値と等しい場合は、深度テストに合格する
Qt3DRender::QDepthTest::GreaterOrEqual0x0206フラグメント深度がzバッファの値以上の場合、深度テストに合格する
Qt3DRender::QDepthTest::Greater0x0204フラグメント深度が z バッファの値より大きい場合、深度テストに合格する
Qt3DRender::QDepthTest::NotEqual0x0205フラグメント深度がZバッファ値と等しくない場合、深度テストに合格する

プロパティのドキュメント

depthFunction : DepthFunction

深度テストで使用される現在の関数を保持します。デフォルトは Never です。

アクセス関数:

Qt3DRender::QDepthTest::DepthFunction depthFunction() const
void setDepthFunction(Qt3DRender::QDepthTest::DepthFunction depthFunction)

通知シグナル:

void depthFunctionChanged(Qt3DRender::QDepthTest::DepthFunction depthFunction)

メンバ関数のドキュメント

[explicit] QDepthTest::QDepthTest(Qt3DCore::QNode *parent = nullptr)

このコンストラクタは、指定されたparent を使用して、新しいQDepthTest::QDepthTest インスタンスを作成します。

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