Class: QgsLightSource¶
Base class for light sources in 3d scenes.
Added in version 3.26.
Class Hierarchy¶
Subclasses¶
Definition of a directional light in a 3D map scene |
|
Definition of a point light in a 3D map scene |
Methods
Returns a copy of the light source. |
|
Reads configuration from a DOM element previously written using |
|
After reading from XML, resolve references to any layers that have been read as layer IDs. |
|
Returns the light source type. |
|
Writes the light source's configuration to a new DOM element and returns it. |
Static Methods
Creates a new light source from an XML element. |
- class qgis._3d.QgsLightSource[source]¶
Bases:
object
- clone(self) QgsLightSource | None [source]¶
Returns a copy of the light source.
- Return type:
Optional[QgsLightSource]
- static createFromXml(element: QDomElement, context: QgsReadWriteContext) QgsLightSource | None [source]¶
Creates a new light source from an XML element.
- Parameters:
element (QDomElement)
context (QgsReadWriteContext)
- Return type:
Optional[QgsLightSource]
- readXml(self, elem: QDomElement, context: QgsReadWriteContext = QgsReadWriteContext())[source]¶
Reads configuration from a DOM element previously written using
writeXml()
.See also
- Parameters:
elem (QDomElement)
context (
QgsReadWriteContext
= QgsReadWriteContext())
- resolveReferences(self, project: QgsProject)[source]¶
After reading from XML, resolve references to any layers that have been read as layer IDs.
- Parameters:
project (QgsProject)
- type(self) Qgis.LightSourceType [source]¶
Returns the light source type.
- Return type:
- writeXml(self, doc: QDomDocument, context: QgsReadWriteContext = QgsReadWriteContext()) QDomElement [source]¶
Writes the light source’s configuration to a new DOM element and returns it.
See also
- Parameters:
doc (QDomDocument)
context (
QgsReadWriteContext
= QgsReadWriteContext())
- Return type:
QDomElement