PySide6.Qt3DRender.Qt3DRender.QAlphaTest¶
- class QAlphaTest¶
QAlphaTest类指定了 alpha 参考测试。更多…概要¶
属性¶
方法¶
def
__init__()def
alphaFunction()def
referenceValue()
插槽¶
信号¶
注意
本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。
详细描述¶
正如OpenGL文档所解释的;alpha测试根据传入片段的alpha值与常量参考值之间的比较结果,有条件地丢弃片段。
- class AlphaFunction¶
alpha函数值的枚举
常量
描述
Qt3DRender.QAlphaTest.Never
从不通过alpha测试
Qt3DRender.QAlphaTest.Always
始终通过alpha测试
Qt3DRender.QAlphaTest.Less
如果片段alpha小于参考值,则通过alpha测试
Qt3DRender.QAlphaTest.LessOrEqual
如果片段alpha小于或等于参考值,则通过alpha测试
Qt3DRender.QAlphaTest.Equal
如果片段alpha等于参考值,则通过alpha测试
Qt3DRender.QAlphaTest.GreaterOrEqual
如果片段alpha大于或等于参考值,则通过alpha测试
Qt3DRender.QAlphaTest.Greater
如果片段alpha大于参考值,则通过alpha测试
Qt3DRender.QAlphaTest.NotEqual
如果片段alpha不等于参考值,则通过alpha测试
注意
当使用
from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。- property alphaFunctionᅟ: Qt3DRender.QAlphaTest.AlphaFunction¶
保存用于alpha测试的alpha函数。默认值为Never。
- Access functions:
- property referenceValueᅟ: float¶
保存用于alpha测试的参考值。默认值为0.0。设置时,该值会被限制在0和1之间。
- Access functions:
- __init__([parent=None])¶
- Parameters:
parent –
QNode
- alphaFunction()¶
- Return type:
AlphaFunction
另请参阅
setAlphaFunction()
属性
alphaFunctionᅟ的获取器。- alphaFunctionChanged(alphaFunction)¶
- Parameters:
alphaFunction –
AlphaFunction
属性
alphaFunctionᅟ的通知信号。- referenceValue()¶
- Return type:
浮点数
另请参阅
setReferenceValue()
属性
referenceValueᅟ的获取器。- referenceValueChanged(referenceValue)¶
- Parameters:
referenceValue – 浮点数
属性
referenceValueᅟ的通知信号。- setAlphaFunction(alphaFunction)¶
- Parameters:
alphaFunction –
AlphaFunction
另请参阅
alphaFunction()
属性
alphaFunctionᅟ的设置器。- setReferenceValue(referenceValue)¶
- Parameters:
referenceValue – 浮点数
另请参阅
referenceValue()
属性
referenceValueᅟ的设置器。