このページでは

Qt3DRender::QAlphaTest Class

class Qt3DRender::QAlphaTest

QAlphaTest クラスは、アルファ参照テストを指定します。詳細...

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

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

パブリック型

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

プロパティ

パブリック関数

Qt3DRender::QAlphaTest::AlphaFunction alphaFunction() const
float referenceValue() const

パブリックスロット

void setAlphaFunction(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)
void setReferenceValue(float referenceValue)

シグナル

void alphaFunctionChanged(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)
void referenceValueChanged(float referenceValue)

詳細な説明

OpenGL のドキュメントで説明されているように、アルファテストは、入力されたフラグメントのアルファ値と定数の基準値との比較結果に基づいて、フラグメントを破棄します。

メンバ型のドキュメント

enum QAlphaTest::AlphaFunction

アルファ関数の値の列挙

定数値説明
Qt3DRender::QAlphaTest::Never0x0200アルファテストに決して合格しない
Qt3DRender::QAlphaTest::Always0x0207常にアルファテストに合格する
Qt3DRender::QAlphaTest::Less0x0201フラグメントαが基準値より小さい場合、αテストに合格する
Qt3DRender::QAlphaTest::LessOrEqual0x0203フラグメントαが基準値以下である場合、アルファテストに合格する
Qt3DRender::QAlphaTest::Equal0x0202フラグメントαが基準値と等しい場合、アルファテストに合格する
Qt3DRender::QAlphaTest::GreaterOrEqual0x0206フラグメントαが基準値以上である場合、アルファテストに合格する
Qt3DRender::QAlphaTest::Greater0x0204フラグメントαが基準値より大きい場合、アルファテストに合格する
Qt3DRender::QAlphaTest::NotEqual0x0205フラグメントαが基準値と等しくない場合、アルファテストに合格する

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

alphaFunction : AlphaFunction

アルファテストで使用されるアルファ関数を保持します。デフォルトは「Never」です。

アクセス関数:

Qt3DRender::QAlphaTest::AlphaFunction alphaFunction() const
void setAlphaFunction(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)

通知シグナル:

void alphaFunctionChanged(Qt3DRender::QAlphaTest::AlphaFunction alphaFunction)

referenceValue : float

アルファテストで使用される基準値を保持します。デフォルトは 0.0 です。設定された場合、その値は 0 から 1 の範囲にクリップされます。

アクセス関数:

float referenceValue() const
void setReferenceValue(float referenceValue)

通知シグナル:

void referenceValueChanged(float referenceValue)

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