内容表

上一话题

Qt3DExtras.QPhongAlphaMaterial

下一话题

Qt3DExtras.QPlaneGeometry

Qt3DExtras.QPhongMaterial

QPhongMaterial class provides a default implementation of the phong lighting effect. 更多

Inheritance diagram of PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial

概要

函数

信号

详细描述

This class is deprecated; use QDiffuseSpecularMaterial 代替。

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. QPhongMaterial ( [ parent=None ] )
param parent

QNode

构造新 QPhongMaterial instance with parent object parent .

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. ambient ( )
返回类型

QColor

另请参阅

setAmbient()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. ambientChanged ( ambient )
参数

ambient QColor

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. diffuse ( )
返回类型

QColor

另请参阅

setDiffuse()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. diffuseChanged ( diffuse )
参数

diffuse QColor

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. setAmbient ( ambient )
参数

ambient QColor

另请参阅

ambient()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. setDiffuse ( diffuse )
参数

diffuse QColor

另请参阅

diffuse()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. setShininess ( shininess )
参数

shininess float

另请参阅

shininess()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. setSpecular ( specular )
参数

specular QColor

另请参阅

specular()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. shininess ( )
返回类型

float

另请参阅

setShininess()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. shininessChanged ( shininess )
参数

shininess float

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. specular ( )
返回类型

QColor

另请参阅

setSpecular()

PySide2.Qt3DExtras.Qt3DExtras.QPhongMaterial. specularChanged ( specular )
参数

specular QColor