QGoochMaterial Class
(Qt3DExtras::QGoochMaterial)The QGoochMaterial provides a material that implements the Gooch shading model, popular in CAD and CAM applications. 更多...
头文件: | #include <QGoochMaterial> |
qmake: | QT += 3dextras |
开始支持版本: | Qt 5.7 |
基类: | Qt3DRender::QMaterial |
属性
- 1 个属性继承自 Qt3DRender::QMaterial
- 1 个属性继承自 Qt3DCore::QComponent
- 3 个属性继承自 Qt3DCore::QNode
- 1 个属性继承自 QObject
公有函数
QGoochMaterial(Qt3DCore::QNode *parent = nullptr) | |
float | alpha() const |
float | beta() const |
QColor | cool() const |
QColor | diffuse() const |
float | shininess() const |
QColor | specular() const |
QColor | warm() const |
- 4 个公有函数继承自 Qt3DRender::QMaterial
- 2 个公有函数继承自 Qt3DCore::QComponent
- 11 个公有函数继承自 Qt3DCore::QNode
- 32 个公有函数继承自 QObject
公有槽函数
void | setAlpha(float alpha) |
void | setBeta(float beta) |
void | setCool(const QColor &cool) |
void | setDiffuse(const QColor &diffuse) |
void | setShininess(float shininess) |
void | setSpecular(const QColor &specular) |
void | setWarm(const QColor &warm) |
- 1 个公有槽函数继承自 Qt3DRender::QMaterial
- 1 个公有槽函数继承自 Qt3DCore::QComponent
- 3 个公有槽函数继承自 Qt3DCore::QNode
- 1 个公有槽函数继承自 QObject
信号
void | alphaChanged(float alpha) |
void | betaChanged(float beta) |
void | coolChanged(const QColor &cool) |
void | diffuseChanged(const QColor &diffuse) |
void | shininessChanged(float shininess) |
void | specularChanged(const QColor &specular) |
void | warmChanged(const QColor &warm) |
- 1 个信号继承自 Qt3DRender::QMaterial
- 3 个信号继承自 Qt3DCore::QComponent
- 4 个信号继承自 Qt3DCore::QNode
- 2 个信号继承自 QObject
受保护的函数
QGoochMaterial(QGoochMaterialPrivate &dd, Qt3DCore::QNode *parent = nullptr) |
- 2 个受保护的函数继承自 Qt3DCore::QNode
- 9 个受保护的函数继承自 QObject
其他继承的成员
详细描述
The QGoochMaterial provides a material that implements the Gooch shading model, popular in CAD and CAM applications.
The Gooch lighting model uses both color and brightness to help show the curvature of 3D surfaces. This is often better than models such as Phong that rely purely upon changes in brightness. In situations such as in CAD and CAM applications where photorealism is not a goal, the Gooch shading model in conjunction with some kind of silhouette edge inking is a popular solution.
The Gooch lighting model is explained fully in the original Gooch paper. The Gooch model mixes a diffuse object color with a user-provided cool color and warm color to produce the end points of a color ramp that is used to shade the object based upon the cosine of the angle between the vector from the fragment to the light source and the fragment's normal vector. Optionally, a specular highlight can be added on top. The relative contributions to the cool and warm colors by the diffuse color are controlled by the alpha and beta properties respecitvely.
This material uses an effect with a single render pass approach and performs per fragment lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.
属性
alpha : float
Holds the current alpha value. The start point of the color ramp used by the Gooch shader is calculated as {c = cool + alpha * diffuse}.
访问函数:
float | alpha() const |
void | setAlpha(float alpha) |
Notifier signal:
void | alphaChanged(float alpha) |
beta : float
Holds the current beta value. The start point of the color ramp used by the Gooch shader is calculated as {c = warm + beta * diffuse}.
访问函数:
float | beta() const |
void | setBeta(float beta) |
Notifier signal:
void | betaChanged(float beta) |
cool : QColor
Holds the current cool color.
访问函数:
QColor | cool() const |
void | setCool(const QColor &cool) |
Notifier signal:
void | coolChanged(const QColor &cool) |
diffuse : QColor
Holds the current diffuse color.
访问函数:
QColor | diffuse() const |
void | setDiffuse(const QColor &diffuse) |
Notifier signal:
void | diffuseChanged(const QColor &diffuse) |
shininess : float
Holds the current shininess value. Higher values of shininess result in a smaller and brighter highlight.
访问函数:
float | shininess() const |
void | setShininess(float shininess) |
Notifier signal:
void | shininessChanged(float shininess) |
specular : QColor
Holds the current specular color.
访问函数:
QColor | specular() const |
void | setSpecular(const QColor &specular) |
Notifier signal:
void | specularChanged(const QColor &specular) |
warm : QColor
Holds the current warm color.
访问函数:
QColor | warm() const |
void | setWarm(const QColor &warm) |
Notifier signal:
void | warmChanged(const QColor &warm) |