mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
147 lines
8.3 KiB
ReStructuredText
147 lines
8.3 KiB
ReStructuredText
.. 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<class_visualinstance>` **<** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
|
|
|
**Inherited By:** :ref:`SpotLight<class_spotlight>`, :ref:`OmniLight<class_omnilight>`, :ref:`DirectionalLight<class_directionallight>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Provides a base class for different kinds of light nodes.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_bake_mode<class_Light_get_bake_mode>` **(** **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_color>` | :ref:`get_color<class_Light_get_color>` **(** :ref:`int<class_int>` color **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_operator<class_Light_get_operator>` **(** **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_parameter<class_Light_get_parameter>` **(** :ref:`int<class_int>` variable **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Texture<class_texture>` | :ref:`get_projector<class_Light_get_projector>` **(** **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`has_project_shadows<class_Light_has_project_shadows>` **(** **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_editor_only<class_Light_is_editor_only>` **(** **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_enabled<class_Light_is_enabled>` **(** **)** const |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_bake_mode<class_Light_set_bake_mode>` **(** :ref:`int<class_int>` bake_mode **)** |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_color<class_Light_set_color>` **(** :ref:`int<class_int>` color, :ref:`Color<class_color>` value **)** |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_editor_only<class_Light_set_editor_only>` **(** :ref:`bool<class_bool>` editor_only **)** |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_enabled<class_Light_set_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_operator<class_Light_set_operator>` **(** :ref:`int<class_int>` operator **)** |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_parameter<class_Light_set_parameter>` **(** :ref:`int<class_int>` variable, :ref:`float<class_float>` value **)** |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_project_shadows<class_Light_set_project_shadows>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_projector<class_Light_set_projector>` **(** :ref:`Texture<class_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<class_int>` **get_bake_mode** **(** **)** const
|
|
|
|
.. _class_Light_get_color:
|
|
|
|
- :ref:`Color<class_color>` **get_color** **(** :ref:`int<class_int>` color **)** const
|
|
|
|
.. _class_Light_get_operator:
|
|
|
|
- :ref:`int<class_int>` **get_operator** **(** **)** const
|
|
|
|
.. _class_Light_get_parameter:
|
|
|
|
- :ref:`float<class_float>` **get_parameter** **(** :ref:`int<class_int>` variable **)** const
|
|
|
|
.. _class_Light_get_projector:
|
|
|
|
- :ref:`Texture<class_texture>` **get_projector** **(** **)** const
|
|
|
|
.. _class_Light_has_project_shadows:
|
|
|
|
- :ref:`bool<class_bool>` **has_project_shadows** **(** **)** const
|
|
|
|
.. _class_Light_is_editor_only:
|
|
|
|
- :ref:`bool<class_bool>` **is_editor_only** **(** **)** const
|
|
|
|
.. _class_Light_is_enabled:
|
|
|
|
- :ref:`bool<class_bool>` **is_enabled** **(** **)** const
|
|
|
|
.. _class_Light_set_bake_mode:
|
|
|
|
- void **set_bake_mode** **(** :ref:`int<class_int>` bake_mode **)**
|
|
|
|
.. _class_Light_set_color:
|
|
|
|
- void **set_color** **(** :ref:`int<class_int>` color, :ref:`Color<class_color>` value **)**
|
|
|
|
.. _class_Light_set_editor_only:
|
|
|
|
- void **set_editor_only** **(** :ref:`bool<class_bool>` editor_only **)**
|
|
|
|
.. _class_Light_set_enabled:
|
|
|
|
- void **set_enabled** **(** :ref:`bool<class_bool>` enabled **)**
|
|
|
|
.. _class_Light_set_operator:
|
|
|
|
- void **set_operator** **(** :ref:`int<class_int>` operator **)**
|
|
|
|
.. _class_Light_set_parameter:
|
|
|
|
- void **set_parameter** **(** :ref:`int<class_int>` variable, :ref:`float<class_float>` value **)**
|
|
|
|
.. _class_Light_set_project_shadows:
|
|
|
|
- void **set_project_shadows** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
.. _class_Light_set_projector:
|
|
|
|
- void **set_projector** **(** :ref:`Texture<class_texture>` projector **)**
|
|
|
|
|