QGoochMaterial#
The QGoochMaterial
provides a material that implements the Gooch shading model, popular in CAD and CAM applications. More…
Synopsis#
Properties#
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)
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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 PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial([parent=None])#
- Parameters:
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Constructs a new QGoochMaterial
instance with parent object parent
.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.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}.
- Access functions:
alpha
()setAlpha
(alpha)Signal
alphaChanged
(alpha)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.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}.
- Access functions:
beta
()setBeta
(beta)Signal
betaChanged
(beta)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.cool: PySide6.QtGui.QColor#
Holds the current cool color.
- Access functions:
cool
()setCool
(cool)Signal
coolChanged
(cool)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.diffuse: PySide6.QtGui.QColor#
Holds the current diffuse color.
- Access functions:
diffuse
()setDiffuse
(diffuse)Signal
diffuseChanged
(diffuse)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.shininess: float#
Holds the current shininess value. Higher values of shininess result in a smaller and brighter highlight.
- Access functions:
shininess
()setShininess
(shininess)Signal
shininessChanged
(shininess)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.specular: PySide6.QtGui.QColor#
Holds the current specular color.
- Access functions:
specular
()setSpecular
(specular)Signal
specularChanged
(specular)
- property PᅟySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.warm: PySide6.QtGui.QColor#
Holds the current warm color.
- Access functions:
warm
()setWarm
(warm)Signal
warmChanged
(warm)
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.alpha()#
- Return type:
float
See also
Getter of property alpha
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.alphaChanged(alpha)#
- Parameters:
alpha – float
Notification signal of property alpha
.
Getter of property beta
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.betaChanged(beta)#
- Parameters:
beta – float
Notification signal of property beta
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.cool()#
- Return type:
See also
Getter of property cool
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.coolChanged(cool)#
- Parameters:
cool –
PySide6.QtGui.QColor
Notification signal of property cool
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.diffuse()#
- Return type:
See also
Getter of property diffuse
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.diffuseChanged(diffuse)#
- Parameters:
diffuse –
PySide6.QtGui.QColor
Notification signal of property diffuse
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.setAlpha(alpha)#
- Parameters:
alpha – float
See also
Setter of property alpha
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.setBeta(beta)#
- Parameters:
beta – float
See also
Setter of property beta
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.setCool(cool)#
- Parameters:
cool –
PySide6.QtGui.QColor
See also
Setter of property cool
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.setDiffuse(diffuse)#
- Parameters:
diffuse –
PySide6.QtGui.QColor
See also
Setter of property diffuse
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.setShininess(shininess)#
- Parameters:
shininess – float
See also
Setter of property shininess
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.setSpecular(specular)#
- Parameters:
specular –
PySide6.QtGui.QColor
See also
Setter of property specular
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.setWarm(warm)#
- Parameters:
warm –
PySide6.QtGui.QColor
See also
Setter of property warm
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.shininess()#
- Return type:
float
See also
Getter of property shininess
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.shininessChanged(shininess)#
- Parameters:
shininess – float
Notification signal of property shininess
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.specular()#
- Return type:
See also
Getter of property specular
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.specularChanged(specular)#
- Parameters:
specular –
PySide6.QtGui.QColor
Notification signal of property specular
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.warm()#
- Return type:
See also
Getter of property warm
.
- PySide6.Qt3DExtras.Qt3DExtras.QGoochMaterial.warmChanged(warm)#
- Parameters:
warm –
PySide6.QtGui.QColor
Notification signal of property warm
.