class_directionallight.rst 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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:`float<class_float>` | :ref:`get_shadow_param<class_DirectionalLight_get_shadow_param>` **(** :ref:`int<class_int>` param **)** const |
  17. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_shadow_mode<class_DirectionalLight_set_shadow_mode>` **(** :ref:`int<class_int>` mode **)** |
  19. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_shadow_param<class_DirectionalLight_set_shadow_param>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
  21. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  22. Numeric Constants
  23. -----------------
  24. - **SHADOW_ORTHOGONAL** = **0**
  25. - **SHADOW_PERSPECTIVE** = **1**
  26. - **SHADOW_PARALLEL_2_SPLITS** = **2**
  27. - **SHADOW_PARALLEL_4_SPLITS** = **3**
  28. - **SHADOW_PARAM_MAX_DISTANCE** = **0**
  29. - **SHADOW_PARAM_PSSM_SPLIT_WEIGHT** = **1**
  30. - **SHADOW_PARAM_PSSM_ZOFFSET_SCALE** = **2**
  31. Description
  32. -----------
  33. 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.
  34. Member Function Description
  35. ---------------------------
  36. .. _class_DirectionalLight_get_shadow_mode:
  37. - :ref:`int<class_int>` **get_shadow_mode** **(** **)** const
  38. .. _class_DirectionalLight_get_shadow_param:
  39. - :ref:`float<class_float>` **get_shadow_param** **(** :ref:`int<class_int>` param **)** const
  40. .. _class_DirectionalLight_set_shadow_mode:
  41. - void **set_shadow_mode** **(** :ref:`int<class_int>` mode **)**
  42. .. _class_DirectionalLight_set_shadow_param:
  43. - void **set_shadow_param** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**