QAlphaTest Class

class Qt3DRender ::QAlphaTest

The QAlphaTest class specify alpha reference test. 更多...

头: #include <QAlphaTest>
qmake: QT += 3drender
Since: Qt 5.7
实例化: AlphaTest
继承: Qt3DRender::QRenderState

该类在 Qt 5.7 引入。

公共类型

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 )

详细描述

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.

成员类型文档编制

enum QAlphaTest:: AlphaFunction

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

特性文档编制

alphaFunction : AlphaFunction

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 )

referenceValue : float

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 )