Qt3DRender::QAlphaTest Class
class Qt3DRender::QAlphaTestQAlphaTest 类指定了阿尔法参考测试。更多内容...
| 头文件: | #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 } |
属性
- alphaFunction : AlphaFunction
- referenceValue : float
公共函数
| 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) |
成员类型文档
enum QAlphaTest::AlphaFunction
alpha 函数值的枚举
| 常量 | 值 | 描述 |
|---|---|---|
Qt3DRender::QAlphaTest::Never | 0x0200 | 永远不通过 alpha 测试 |
Qt3DRender::QAlphaTest::Always | 0x0207 | 始终通过α测试 |
Qt3DRender::QAlphaTest::Less | 0x0201 | 若片段α小于参考值,则通过α测试 |
Qt3DRender::QAlphaTest::LessOrEqual | 0x0203 | 若片段α小于或等于参考值,则通过α测试 |
Qt3DRender::QAlphaTest::Equal | 0x0202 | 若片段α等于参考值,则通过α测试 |
Qt3DRender::QAlphaTest::GreaterOrEqual | 0x0206 | 若片段α大于或等于参考值,则通过α测试 |
Qt3DRender::QAlphaTest::Greater | 0x0204 | 若片段α值大于参考值,则通过α测试 |
Qt3DRender::QAlphaTest::NotEqual | 0x0205 | 如果片段α值不等于参考值,则通过α测试 |
属性文档
alphaFunction : AlphaFunction
存储alpha测试所使用的alpha函数。默认值为“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.