class_lightoccluder2d.rst 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the LightOccluder2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_LightOccluder2D:
  5. LightOccluder2D
  6. ===============
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Occludes light cast by a Light2D, casting shadows.
  12. Member Functions
  13. ----------------
  14. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_occluder_light_mask<class_LightOccluder2D_get_occluder_light_mask>` **(** **)** const |
  16. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`OccluderPolygon2D<class_occluderpolygon2d>` | :ref:`get_occluder_polygon<class_LightOccluder2D_get_occluder_polygon>` **(** **)** const |
  18. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`set_occluder_light_mask<class_LightOccluder2D_set_occluder_light_mask>` **(** :ref:`int<class_int>` mask **)** |
  20. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_occluder_polygon<class_LightOccluder2D_set_occluder_polygon>` **(** :ref:`OccluderPolygon2D<class_occluderpolygon2d>` polygon **)** |
  22. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  23. Member Variables
  24. ----------------
  25. - :ref:`int<class_int>` **light_mask** - The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
  26. - :ref:`OccluderPolygon2D<class_occluderpolygon2d>` **occluder** - The [OccluderPolygon2D] used to compute the shadow.
  27. Description
  28. -----------
  29. Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an :ref:`OccluderPolygon2D<class_occluderpolygon2d>` in order for the shadow to be computed.
  30. Member Function Description
  31. ---------------------------
  32. .. _class_LightOccluder2D_get_occluder_light_mask:
  33. - :ref:`int<class_int>` **get_occluder_light_mask** **(** **)** const
  34. Return the light mask of the LightOccluder2D.
  35. .. _class_LightOccluder2D_get_occluder_polygon:
  36. - :ref:`OccluderPolygon2D<class_occluderpolygon2d>` **get_occluder_polygon** **(** **)** const
  37. Return the OccluderPolygon2D that defines the LightOccluder2D.
  38. .. _class_LightOccluder2D_set_occluder_light_mask:
  39. - void **set_occluder_light_mask** **(** :ref:`int<class_int>` mask **)**
  40. Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).
  41. .. _class_LightOccluder2D_set_occluder_polygon:
  42. - void **set_occluder_polygon** **(** :ref:`OccluderPolygon2D<class_occluderpolygon2d>` polygon **)**
  43. Set the OccluderPolygon2D that defines the LightOccluder2D.