.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_Light: Light ===== **Inherits:** :ref:`VisualInstance` **<** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`SpotLight`, :ref:`OmniLight`, :ref:`DirectionalLight` **Category:** Core Brief Description ----------------- Provides a base class for different kinds of light nodes. Member Functions ---------------- +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_bake_mode` **(** **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_color` **(** :ref:`int` color **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_operator` **(** **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_parameter` **(** :ref:`int` variable **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_projector` **(** **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_project_shadows` **(** **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_editor_only` **(** **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_enabled` **(** **)** const | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_bake_mode` **(** :ref:`int` bake_mode **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_color` **(** :ref:`int` color, :ref:`Color` value **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_editor_only` **(** :ref:`bool` editor_only **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_enabled` **(** :ref:`bool` enabled **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_operator` **(** :ref:`int` operator **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_parameter` **(** :ref:`int` variable, :ref:`float` value **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_project_shadows` **(** :ref:`bool` enable **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_projector` **(** :ref:`Texture` projector **)** | +--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+ Numeric Constants ----------------- - **PARAM_RADIUS** = **2** - **PARAM_ENERGY** = **3** - **PARAM_ATTENUATION** = **4** - **PARAM_SPOT_ANGLE** = **1** - **PARAM_SPOT_ATTENUATION** = **0** - **PARAM_SHADOW_DARKENING** = **5** - **PARAM_SHADOW_Z_OFFSET** = **6** - **COLOR_DIFFUSE** = **0** - **COLOR_SPECULAR** = **1** - **BAKE_MODE_DISABLED** = **0** - **BAKE_MODE_INDIRECT** = **1** - **BAKE_MODE_INDIRECT_AND_SHADOWS** = **2** - **BAKE_MODE_FULL** = **3** Description ----------- Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. Member Function Description --------------------------- .. _class_Light_get_bake_mode: - :ref:`int` **get_bake_mode** **(** **)** const .. _class_Light_get_color: - :ref:`Color` **get_color** **(** :ref:`int` color **)** const .. _class_Light_get_operator: - :ref:`int` **get_operator** **(** **)** const .. _class_Light_get_parameter: - :ref:`float` **get_parameter** **(** :ref:`int` variable **)** const .. _class_Light_get_projector: - :ref:`Texture` **get_projector** **(** **)** const .. _class_Light_has_project_shadows: - :ref:`bool` **has_project_shadows** **(** **)** const .. _class_Light_is_editor_only: - :ref:`bool` **is_editor_only** **(** **)** const .. _class_Light_is_enabled: - :ref:`bool` **is_enabled** **(** **)** const .. _class_Light_set_bake_mode: - void **set_bake_mode** **(** :ref:`int` bake_mode **)** .. _class_Light_set_color: - void **set_color** **(** :ref:`int` color, :ref:`Color` value **)** .. _class_Light_set_editor_only: - void **set_editor_only** **(** :ref:`bool` editor_only **)** .. _class_Light_set_enabled: - void **set_enabled** **(** :ref:`bool` enabled **)** .. _class_Light_set_operator: - void **set_operator** **(** :ref:`int` operator **)** .. _class_Light_set_parameter: - void **set_parameter** **(** :ref:`int` variable, :ref:`float` value **)** .. _class_Light_set_project_shadows: - void **set_project_shadows** **(** :ref:`bool` enable **)** .. _class_Light_set_projector: - void **set_projector** **(** :ref:`Texture` projector **)**