class_directionallight.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the DirectionalLight.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_DirectionalLight:
  5. DirectionalLight
  6. ================
  7. **Inherits:** :ref:`Light<class_light>` **<** :ref:`VisualInstance<class_visualinstance>` **<** :ref:`Spatial<class_spatial>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Directional Light, such as the Sun or the Moon.
  12. Member Functions
  13. ----------------
  14. +--------------------------+-----------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_shadow_depth_range<class_DirectionalLight_get_shadow_depth_range>` **(** **)** const |
  16. +--------------------------+-----------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_shadow_mode<class_DirectionalLight_get_shadow_mode>` **(** **)** const |
  18. +--------------------------+-----------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`is_blend_splits_enabled<class_DirectionalLight_is_blend_splits_enabled>` **(** **)** const |
  20. +--------------------------+-----------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_blend_splits<class_DirectionalLight_set_blend_splits>` **(** :ref:`bool<class_bool>` enabled **)** |
  22. +--------------------------+-----------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_shadow_depth_range<class_DirectionalLight_set_shadow_depth_range>` **(** :ref:`int<class_int>` mode **)** |
  24. +--------------------------+-----------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_shadow_mode<class_DirectionalLight_set_shadow_mode>` **(** :ref:`int<class_int>` mode **)** |
  26. +--------------------------+-----------------------------------------------------------------------------------------------------------------------+
  27. Member Variables
  28. ----------------
  29. - :ref:`float<class_float>` **directional_shadow_bias_split_scale**
  30. - :ref:`bool<class_bool>` **directional_shadow_blend_splits**
  31. - :ref:`int<class_int>` **directional_shadow_depth_range**
  32. - :ref:`float<class_float>` **directional_shadow_max_distance**
  33. - :ref:`int<class_int>` **directional_shadow_mode**
  34. - :ref:`float<class_float>` **directional_shadow_normal_bias**
  35. - :ref:`float<class_float>` **directional_shadow_split_1**
  36. - :ref:`float<class_float>` **directional_shadow_split_2**
  37. - :ref:`float<class_float>` **directional_shadow_split_3**
  38. Numeric Constants
  39. -----------------
  40. - **SHADOW_ORTHOGONAL** = **0**
  41. - **SHADOW_PARALLEL_2_SPLITS** = **1**
  42. - **SHADOW_PARALLEL_4_SPLITS** = **2**
  43. - **SHADOW_DEPTH_RANGE_STABLE** = **0**
  44. - **SHADOW_DEPTH_RANGE_OPTIMIZED** = **1**
  45. Description
  46. -----------
  47. 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.
  48. Member Function Description
  49. ---------------------------
  50. .. _class_DirectionalLight_get_shadow_depth_range:
  51. - :ref:`int<class_int>` **get_shadow_depth_range** **(** **)** const
  52. .. _class_DirectionalLight_get_shadow_mode:
  53. - :ref:`int<class_int>` **get_shadow_mode** **(** **)** const
  54. .. _class_DirectionalLight_is_blend_splits_enabled:
  55. - :ref:`bool<class_bool>` **is_blend_splits_enabled** **(** **)** const
  56. .. _class_DirectionalLight_set_blend_splits:
  57. - void **set_blend_splits** **(** :ref:`bool<class_bool>` enabled **)**
  58. .. _class_DirectionalLight_set_shadow_depth_range:
  59. - void **set_shadow_depth_range** **(** :ref:`int<class_int>` mode **)**
  60. .. _class_DirectionalLight_set_shadow_mode:
  61. - void **set_shadow_mode** **(** :ref:`int<class_int>` mode **)**