CullFace QML Type

CullFace 类型用于指定是启用正面还是背面剔除。更多

Import Statement: import Qt3D.Render 2.9
In C++: QCullFace
Inherits:

RenderState

Status: Deprecated

属性

  • mode : enumeration

详细说明

CullFace 设置是剔除正面还是背面。切面包括三角形、四边形、多边形和矩形。

它可以添加到RenderPass 的 renderStates 属性中:

RenderPass {
    shaderProgram: ShaderProgram {
        // ...
    }
    renderStates: [
        CullFace {
            mode: CullFace.Front
        }
    ]
}

或添加到RenderStateSet 的 renderStates 属性中:

RenderStateSet {
    renderStates: [
        CullFace {
            mode: CullFace.Front
        }
    ]
}

另请参阅 FrontFace

属性文档

mode : enumeration

保存CullFace 使用的剔除模式。默认设置为 QCullFace.Back。

  • CullFace.NoCulling - 禁用剔除模式
  • CullFace.Front(正面)- 对正面多边形启用剔除功能
  • CullFace.Back(背面)- 启用背面多边形的剔除功能
  • CullFace.FrontAndBack - 启用所有多边形的剔除功能,但会绘制点和线

© 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.