class_directionallight.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_DirectionalLight:
  4. DirectionalLight
  5. ================
  6. **Inherits:** :ref:`Light<class_light>` **<** :ref:`VisualInstance<class_visualinstance>` **<** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Directional Light, such as the Sun or the Moon.
  11. Member Functions
  12. ----------------
  13. +--------------------------+----------------------------------------------------------------------------------------------------------------+
  14. | :ref:`int<class_int>` | :ref:`get_shadow_mode<class_DirectionalLight_get_shadow_mode>` **(** **)** const |
  15. +--------------------------+----------------------------------------------------------------------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`is_blend_splits_enabled<class_DirectionalLight_is_blend_splits_enabled>` **(** **)** const |
  17. +--------------------------+----------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_blend_splits<class_DirectionalLight_set_blend_splits>` **(** :ref:`bool<class_bool>` enabled **)** |
  19. +--------------------------+----------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_shadow_mode<class_DirectionalLight_set_shadow_mode>` **(** :ref:`int<class_int>` mode **)** |
  21. +--------------------------+----------------------------------------------------------------------------------------------------------------+
  22. Member Variables
  23. ----------------
  24. - :ref:`bool<class_bool>` **directional_shadow_blend_splits**
  25. - :ref:`int<class_int>` **directional_shadow_mode**
  26. - :ref:`float<class_float>` **directional_shadow_normal_bias**
  27. - :ref:`float<class_float>` **directional_shadow_split_1**
  28. - :ref:`float<class_float>` **directional_shadow_split_2**
  29. - :ref:`float<class_float>` **directional_shadow_split_3**
  30. Numeric Constants
  31. -----------------
  32. - **SHADOW_ORTHOGONAL** = **0**
  33. - **SHADOW_PARALLEL_2_SPLITS** = **1**
  34. - **SHADOW_PARALLEL_4_SPLITS** = **2**
  35. Description
  36. -----------
  37. A DirectionalLight is a type of :ref:`Light<class_light>` node that emits light constantly in one direction (the negative z axis of the node). It is used lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored, only the basis is used do determine light direction.
  38. Member Function Description
  39. ---------------------------
  40. .. _class_DirectionalLight_get_shadow_mode:
  41. - :ref:`int<class_int>` **get_shadow_mode** **(** **)** const
  42. .. _class_DirectionalLight_is_blend_splits_enabled:
  43. - :ref:`bool<class_bool>` **is_blend_splits_enabled** **(** **)** const
  44. .. _class_DirectionalLight_set_blend_splits:
  45. - void **set_blend_splits** **(** :ref:`bool<class_bool>` enabled **)**
  46. .. _class_DirectionalLight_set_shadow_mode:
  47. - void **set_shadow_mode** **(** :ref:`int<class_int>` mode **)**