class_lightoccluder2d.rst 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_LightOccluder2D:
  4. LightOccluder2D
  5. ===============
  6. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Occludes light cast by a Light2D, thus casting shadows.
  11. Member Functions
  12. ----------------
  13. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`int<class_int>` | :ref:`get_occluder_light_mask<class_LightOccluder2D_get_occluder_light_mask>` **(** **)** const |
  15. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`OccluderPolygon2D<class_occluderpolygon2d>` | :ref:`get_occluder_polygon<class_LightOccluder2D_get_occluder_polygon>` **(** **)** const |
  17. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_occluder_light_mask<class_LightOccluder2D_set_occluder_light_mask>` **(** :ref:`int<class_int>` mask **)** |
  19. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | void | :ref:`set_occluder_polygon<class_LightOccluder2D_set_occluder_polygon>` **(** :ref:`OccluderPolygon2D<class_occluderpolygon2d>` polygon **)** |
  21. +----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
  22. Description
  23. -----------
  24. Occludes light cast by a Light2D, thus casting shadows. The LightOccluder2D must be provided with a shape (see OccluderPolygon2D) that allows the shadow to be computed. This shape affects the resulting shadow, while the shape of the representating asset shadowed does not actually affect shadows.
  25. Member Function Description
  26. ---------------------------
  27. .. _class_LightOccluder2D_get_occluder_light_mask:
  28. - :ref:`int<class_int>` **get_occluder_light_mask** **(** **)** const
  29. Return the light mask of the LightOccluder2D.
  30. .. _class_LightOccluder2D_get_occluder_polygon:
  31. - :ref:`OccluderPolygon2D<class_occluderpolygon2d>` **get_occluder_polygon** **(** **)** const
  32. Return the OccluderPolygon2D that defines the LightOccluder2D.
  33. .. _class_LightOccluder2D_set_occluder_light_mask:
  34. - void **set_occluder_light_mask** **(** :ref:`int<class_int>` mask **)**
  35. Set the LightOccluder2D light mask. The LightOccluder2D will cast shadows only from Light2Ds that belong to the same light mask(s).
  36. .. _class_LightOccluder2D_set_occluder_polygon:
  37. - void **set_occluder_polygon** **(** :ref:`OccluderPolygon2D<class_occluderpolygon2d>` polygon **)**
  38. Set the OccluderPolygon2D that defines the LightOccluder2D.