Qt3DExtras::QPerVertexColorMaterial Class

class Qt3DExtras::QPerVertexColorMaterial

QPerVertexColorMaterial 类提供了一个默认实现,用于渲染为每个顶点设置的颜色属性。更多

Header: #include <QPerVertexColorMaterial>
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)

使用父对象parent 构建一个新的 QPerVertexColorMaterial 实例。

[virtual noexcept] QPerVertexColorMaterial::~QPerVertexColorMaterial()

摧毁QPerVertexColorMaterial

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