内容表

上一话题

Qt3DRender.QSortPolicy

下一话题

Qt3DRender.QStencilMask

Qt3DRender.QSpotLight

Encapsulate a Spot Light object in a Qt 3D scene. 更多

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QSpotLight

概要

信号

详细描述

A spotlight is a light source that emits a cone of light in a particular direction.

A spotlight uses three attenuation factors to describe how the intensity of the light decreases over distance. These factors are designed to be used together in calcuating total attenuation. For the materials in Qt3D Extras the following formula is used, where distance is the distance from the light to the surface being rendered:

totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));
											

Custom materials may choose to interpret these factors differently.

class PySide2.Qt3DRender.Qt3DRender. QSpotLight ( [ parent=None ] )
param parent

QNode

构造新 QSpotLight with the specified parent .

PySide2.Qt3DRender.Qt3DRender.QSpotLight. constantAttenuation ( )
返回类型

float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. constantAttenuationChanged ( constantAttenuation )
参数

constantAttenuation float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. cutOffAngle ( )
返回类型

float

另请参阅

setCutOffAngle()

PySide2.Qt3DRender.Qt3DRender.QSpotLight. cutOffAngleChanged ( cutOffAngle )
参数

cutOffAngle float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. linearAttenuation ( )
返回类型

float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. linearAttenuationChanged ( linearAttenuation )
参数

linearAttenuation float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. localDirection ( )
返回类型

QVector3D

PySide2.Qt3DRender.Qt3DRender.QSpotLight. localDirectionChanged ( localDirection )
参数

localDirection QVector3D

PySide2.Qt3DRender.Qt3DRender.QSpotLight. quadraticAttenuation ( )
返回类型

float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. quadraticAttenuationChanged ( quadraticAttenuation )
参数

quadraticAttenuation float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. setConstantAttenuation ( value )
参数

value float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. setCutOffAngle ( cutOffAngle )
参数

cutOffAngle float

另请参阅

cutOffAngle()

PySide2.Qt3DRender.Qt3DRender.QSpotLight. setLinearAttenuation ( value )
参数

value float

PySide2.Qt3DRender.Qt3DRender.QSpotLight. setLocalDirection ( localDirection )
参数

localDirection QVector3D

另请参阅

localDirection()

PySide2.Qt3DRender.Qt3DRender.QSpotLight. setQuadraticAttenuation ( value )
参数

value float