Qt3DRender::QAlphaTest Class
class Qt3DRender::QAlphaTestQAlphaTest 类指定了 alpha 参考测试。更多
头文件: | #include <QAlphaTest> |
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
阿尔法函数值枚举
常数 | 值 | 说明 |
---|---|---|
Qt3DRender::QAlphaTest::Never | 0x0200 | 从不通过阿尔法测试 |
Qt3DRender::QAlphaTest::Always | 0x0207 | 始终通过 alpha 检验 |
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
保存阿尔法测试使用的阿尔法函数。默认为从不。
访问功能:
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) |
© 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.