QDepthTest Class

class Qt3DRender::QDepthTest

QDepthTestクラスは、フラグメントシェーダーの深度値を、書き込まれているサンプルの深度に対してテストします。詳細...

ヘッダー #include <QDepthTest>
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-buffer を持っていない場合、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 インスタンスを作成します。

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