.. 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:`Color` | :ref:`get_color` **(** **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_cull_mask` **(** **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_param` **(** :ref:`int` param **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_shadow_color` **(** **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_shadow_reverse_cull_face` **(** **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_shadow` **(** **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_editor_only` **(** **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_negative` **(** **)** const | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_color` **(** :ref:`Color` color **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_cull_mask` **(** :ref:`int` cull_mask **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_editor_only` **(** :ref:`bool` editor_only **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_negative` **(** :ref:`bool` enabled **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_param` **(** :ref:`int` param, :ref:`float` value **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_shadow` **(** :ref:`bool` enabled **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_shadow_color` **(** :ref:`Color` shadow_color **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_shadow_reverse_cull_face` **(** :ref:`bool` enable **)** | +----------------------------+----------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`bool` **editor_only** - :ref:`Color` **light_color** - :ref:`int` **light_cull_mask** - :ref:`float` **light_energy** - :ref:`bool` **light_negative** - :ref:`float` **light_specular** - :ref:`float` **shadow_bias** - :ref:`Color` **shadow_color** - :ref:`float` **shadow_contact** - :ref:`bool` **shadow_enabled** - :ref:`float` **shadow_max_distance** - :ref:`bool` **shadow_reverse_cull_face** Numeric Constants ----------------- - **PARAM_ENERGY** = **0** - **PARAM_SPECULAR** = **1** - **PARAM_RANGE** = **2** - **PARAM_ATTENUATION** = **3** - **PARAM_SPOT_ANGLE** = **4** - **PARAM_SPOT_ATTENUATION** = **5** - **PARAM_CONTACT_SHADOW_SIZE** = **6** - **PARAM_SHADOW_MAX_DISTANCE** = **7** - **PARAM_SHADOW_SPLIT_1_OFFSET** = **8** - **PARAM_SHADOW_SPLIT_2_OFFSET** = **9** - **PARAM_SHADOW_SPLIT_3_OFFSET** = **10** - **PARAM_SHADOW_NORMAL_BIAS** = **11** - **PARAM_SHADOW_BIAS** = **12** - **PARAM_MAX** = **14** 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_color: - :ref:`Color` **get_color** **(** **)** const .. _class_Light_get_cull_mask: - :ref:`int` **get_cull_mask** **(** **)** const .. _class_Light_get_param: - :ref:`float` **get_param** **(** :ref:`int` param **)** const .. _class_Light_get_shadow_color: - :ref:`Color` **get_shadow_color** **(** **)** const .. _class_Light_get_shadow_reverse_cull_face: - :ref:`bool` **get_shadow_reverse_cull_face** **(** **)** const .. _class_Light_has_shadow: - :ref:`bool` **has_shadow** **(** **)** const .. _class_Light_is_editor_only: - :ref:`bool` **is_editor_only** **(** **)** const .. _class_Light_is_negative: - :ref:`bool` **is_negative** **(** **)** const .. _class_Light_set_color: - void **set_color** **(** :ref:`Color` color **)** .. _class_Light_set_cull_mask: - void **set_cull_mask** **(** :ref:`int` cull_mask **)** .. _class_Light_set_editor_only: - void **set_editor_only** **(** :ref:`bool` editor_only **)** .. _class_Light_set_negative: - void **set_negative** **(** :ref:`bool` enabled **)** .. _class_Light_set_param: - void **set_param** **(** :ref:`int` param, :ref:`float` value **)** .. _class_Light_set_shadow: - void **set_shadow** **(** :ref:`bool` enabled **)** .. _class_Light_set_shadow_color: - void **set_shadow_color** **(** :ref:`Color` shadow_color **)** .. _class_Light_set_shadow_reverse_cull_face: - void **set_shadow_reverse_cull_face** **(** :ref:`bool` enable **)**