Qt3DExtras::QPerVertexColorMaterial Class
class Qt3DExtras::QPerVertexColorMaterialQPerVertexColorMaterial 类为渲染每个顶点所设置的颜色属性提供了默认实现。更多内容...
| 头文件: | #include <qpervertexcolormaterial.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| 继承自: | Qt3DRender::QMaterial |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
公共函数
| QPerVertexColorMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QPerVertexColorMaterial() |
详细说明
此光照效果基于环境光和漫反射光这两个光照组件的组合。环境光由顶点颜色决定。漫反射光则考虑了每个顶点的法线分布。
- 环境光是指在没有任何其他光源的情况下,物体所发出的颜色。
- 漫反射是指在光线照射下,粗糙表面反射所呈现的颜色
该材质采用单渲染通道的方法,并形成片段照明。提供了适用于 OpenGL 2、OpenGL 3 或更高版本以及 OpenGL ES 2 的技术。
成员函数文档
[explicit] QPerVertexColorMaterial::QPerVertexColorMaterial(Qt3DCore::QNode *parent = nullptr)
创建一个新的 QPerVertexColorMaterial 实例,其父对象为parent 。
[virtual noexcept] QPerVertexColorMaterial::~QPerVertexColorMaterial()
© 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.