Class: QgsPointLightSettings¶
Definition of a point light in a 3D map scene.
Total light at the distance D from a point light with intensity I is (I / TA) where TA is total attenuation which is calculated as (A_0 + A_1 * D + A_2 * D^2). The terms A_0, A_1 and A_2 stand for constant, linear and quadratic attenuation.
Added in version 3.6.
Class Hierarchy¶
Base classes¶
Base class for light sources in 3d scenes. |
Methods
Returns color of the light |
|
Returns constant attenuation (A_0) |
|
Returns intensity of the light |
|
Returns linear attenuation (A_1) |
|
Returns position of the light (in 3D world coordinates) |
|
Returns quadratic attenuation (A_2) |
|
Sets color of the light |
|
Sets constant attenuation (A_0) |
|
Sets intensity of the light |
|
Sets linear attenuation (A_1) |
|
Sets position of the light (in 3D world coordinates) |
|
Sets quadratic attenuation (A_2) |
- class qgis._3d.QgsPointLightSettings[source]¶
Bases:
QgsLightSource
- __init__()
Construct a point light with default values
- __init__(a0: QgsPointLightSettings)
- Parameters:
- position(self) QgsVector3D [source]¶
Returns position of the light (in 3D world coordinates)
- Return type:
- setColor(self, color: QColor | Qt.GlobalColor)[source]¶
Sets color of the light
- Parameters:
color (Union[QColor, Qt.GlobalColor])
- setConstantAttenuation(self, value: float)[source]¶
Sets constant attenuation (A_0)
- Parameters:
value (float)
- setIntensity(self, intensity: float)[source]¶
Sets intensity of the light
- Parameters:
intensity (float)
- setLinearAttenuation(self, value: float)[source]¶
Sets linear attenuation (A_1)
- Parameters:
value (float)
- setPosition(self, pos: QgsVector3D)[source]¶
Sets position of the light (in 3D world coordinates)
- Parameters:
pos (QgsVector3D)