Qt3DExtras.QGoochMaterial¶
The
QGoochMaterial
provides a material that implements the Gooch shading model, popular in CAD and CAM applications. More…
Synopsis¶
Functions¶
Slots¶
def
setAlpha
(alpha)def
setBeta
(beta)def
setCool
(cool)def
setDiffuse
(diffuse)def
setShininess
(shininess)def
setSpecular
(specular)def
setWarm
(warm)
Signals¶
def
alphaChanged
(alpha)def
betaChanged
(beta)def
coolChanged
(cool)def
diffuseChanged
(diffuse)def
shininessChanged
(shininess)def
specularChanged
(specular)def
warmChanged
(warm)
Detailed Description¶
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.
-
class
PySide2.Qt3DExtras.Qt3DExtras.
QGoochMaterial
([parent=None])¶ - param parent
QNode
Constructs a new
QGoochMaterial
instance with parent objectparent
.
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
alpha
()¶ - Return type
float
See also
setAlpha()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
alphaChanged
(alpha)¶ - Parameters
alpha –
float
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
beta
()¶ - Return type
float
See also
setBeta()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
betaChanged
(beta)¶ - Parameters
beta –
float
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
cool
()¶ - Return type
QColor
See also
setCool()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
coolChanged
(cool)¶ - Parameters
cool –
QColor
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
diffuse
()¶ - Return type
QColor
See also
setDiffuse()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
diffuseChanged
(diffuse)¶ - Parameters
diffuse –
QColor
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
setAlpha
(alpha)¶ - Parameters
alpha –
float
See also
alpha()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
setBeta
(beta)¶ - Parameters
beta –
float
See also
beta()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
setCool
(cool)¶ - Parameters
cool –
QColor
See also
cool()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
setDiffuse
(diffuse)¶ - Parameters
diffuse –
QColor
See also
diffuse()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
setShininess
(shininess)¶ - Parameters
shininess –
float
See also
shininess()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
setSpecular
(specular)¶ - Parameters
specular –
QColor
See also
specular()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
setWarm
(warm)¶ - Parameters
warm –
QColor
See also
warm()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
shininess
()¶ - Return type
float
See also
setShininess()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
shininessChanged
(shininess)¶ - Parameters
shininess –
float
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
specular
()¶ - Return type
QColor
See also
setSpecular()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
specularChanged
(specular)¶ - Parameters
specular –
QColor
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
warm
()¶ - Return type
QColor
See also
setWarm()
-
PySide2.Qt3DExtras.Qt3DExtras.QGoochMaterial.
warmChanged
(warm)¶ - Parameters
warm –
QColor
© 2018 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.