- class QMorphPhongMaterial#
The
QMorphPhongMaterial
class provides a default implementation of the phong lighting effect. More…Synopsis#
Properties#
Methods#
def
__init__()
def
ambient()
def
diffuse()
def
interpolator()
def
shininess()
def
specular()
Slots#
def
setAmbient()
def
setDiffuse()
def
setShininess()
def
setSpecular()
Signals#
def
ambientChanged()
def
diffuseChanged()
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 phong lighting effect is based on the combination of 3 lighting components ambient, diffuse and specular. The relative strengths of these components are controlled by means of their reflectivity coefficients which are modelled as RGB triplets:
Ambient is the color that is emitted by an object without any other light source.
Diffuse is the color that is emitted for rought surface reflections with the lights.
Specular is the color emitted for shiny surface reflections with the lights.
The shininess of a surface is controlled by a float property.
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.
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.Holds the ambient color.
- Access functions:
Holds the diffuse color.
- Access functions:
- property interpolatorᅟ: float#
Contains the interpolation method of the Phong lighting effect.
- Access functions:
- property shininessᅟ: float#
Holds the shininess exponent.
- Access functions:
Holds the specular color.
- Access functions:
- __init__([parent=None])#
- Parameters:
parent –
QNode
Constructs a new
QMorphPhongMaterial
instance with parent objectparent
.Getter of property
ambientᅟ
.Notification signal of property
ambientᅟ
.Getter of property
diffuseᅟ
.Notification signal of property
diffuseᅟ
.- interpolator()#
- Return type:
float
See also
setInterpolator()
Getter of property
interpolatorᅟ
.- interpolatorChanged(interpolator)#
- Parameters:
interpolator – float
Notification signal of property
interpolatorᅟ
.Setter of property
ambientᅟ
.Setter of property
diffuseᅟ
.- setInterpolator(interpolator)#
- Parameters:
interpolator – float
See also
interpolator()
Setter of property
interpolatorᅟ
.- setShininess(shininess)#
- Parameters:
shininess – float
See also
shininess()
Setter of property
shininessᅟ
.Setter of property
specularᅟ
.- shininess()#
- Return type:
float
See also
setShininess()
Getter of property
shininessᅟ
.- shininessChanged(shininess)#
- Parameters:
shininess – float
Notification signal of property
shininessᅟ
.Getter of property
specularᅟ
.Notification signal of property
specularᅟ
.