Qt3DExtras.QDiffuseSpecularMaterial

The QDiffuseSpecularMaterial class provides a default implementation of the phong lighting effect. More

Inheritance diagram of PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial

New in version 5.10.

Synopsis

Functions

Slots

Signals

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.

class PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial([parent=None])
param parent

QNode

Constructs a new QDiffuseSpecularMaterial instance with parent object parent .

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.alphaBlendingEnabledChanged(enabled)
Parameters

enabledbool

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.ambient()
Return type

QColor

See also

setAmbient()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.ambientChanged(ambient)
Parameters

ambientQColor

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.diffuse()
Return type

object

See also

setDiffuse()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.diffuseChanged(diffuse)
Parameters

diffuse – object

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.isAlphaBlendingEnabled()
Return type

bool

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.normal()
Return type

object

See also

setNormal()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.normalChanged(normal)
Parameters

normal – object

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.setAlphaBlendingEnabled(enabled)
Parameters

enabledbool

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.setAmbient(ambient)
Parameters

ambientQColor

See also

ambient()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.setDiffuse(diffuse)
Parameters

diffuse – object

See also

diffuse()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.setNormal(normal)
Parameters

normal – object

See also

normal()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.setShininess(shininess)
Parameters

shininessfloat

See also

shininess()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.setSpecular(specular)
Parameters

specular – object

See also

specular()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.setTextureScale(textureScale)
Parameters

textureScalefloat

See also

textureScale()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.shininess()
Return type

float

See also

setShininess()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.shininessChanged(shininess)
Parameters

shininessfloat

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.specular()
Return type

object

See also

setSpecular()

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.specularChanged(specular)
Parameters

specular – object

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.textureScale()
Return type

float

PySide2.Qt3DExtras.Qt3DExtras.QDiffuseSpecularMaterial.textureScaleChanged(textureScale)
Parameters

textureScalefloat