The QAlphaTest class specify alpha reference test. 更多...
头: | #include <QAlphaTest> |
qmake: | QT += 3drender |
Since: | Qt 5.7 |
实例化: | AlphaTest |
继承: | Qt3DRender::QRenderState |
enum | AlphaFunction { Never, Always, Less, LessOrEqual, ..., NotEqual } |
QAlphaTest (Qt3DCore::QNode * parent = nullptr) | |
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 ) |
const QMetaObject | staticMetaObject |
The QAlphaTest class specify alpha reference test.
As the OpenGL documentation explains; The alpha test discards a fragment conditional on the outcome of a comparison between the incoming fragment's alpha value and a constant reference value.
Enumeration for the alpha function values
常量 | 值 | 描述 |
---|---|---|
Qt3DRender::QAlphaTest::Never
|
0x0200
|
Never pass alpha test |
Qt3DRender::QAlphaTest::Always
|
0x0207
|
Always pass alpha test |
Qt3DRender::QAlphaTest::Less
|
0x0201
|
Pass alpha test if fragment alpha is less than reference value |
Qt3DRender::QAlphaTest::LessOrEqual
|
0x0203
|
Pass alpha test if fragment alpha is less than or equal to reference value |
Qt3DRender::QAlphaTest::Equal
|
0x0202
|
Pass alpha test if fragment alpha is equal to reference value |
Qt3DRender::QAlphaTest::GreaterOrEqual
|
0x0206
|
Pass alpha test if fragment alpha is greater than or equal to reference value |
Qt3DRender::QAlphaTest::Greater
|
0x0204
|
Pass alpha test if fragment alpha is greater than reference value |
Qt3DRender::QAlphaTest::NotEqual
|
0x0205
|
Pass alpha test if fragment alpha is not equal to reference value |
Holds the alpha function used by the alpha test. Default is Never.
访问函数:
Qt3DRender::QAlphaTest::AlphaFunction | alphaFunction () const |
void | setAlphaFunction (Qt3DRender::QAlphaTest::AlphaFunction alphaFunction ) |
通知程序信号:
void | alphaFunctionChanged (Qt3DRender::QAlphaTest::AlphaFunction alphaFunction ) |
Holds the reference value used by the alpha test. Default is 0.0. When set, the value is clamped between 0 and 1.
访问函数:
float | referenceValue () const |
void | setReferenceValue (float referenceValue ) |
通知程序信号:
void | referenceValueChanged (float referenceValue ) |
Default constructs an instance of QAlphaTest.