class_lightoccluder2d.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the LightOccluder2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_LightOccluder2D:
  6. LightOccluder2D
  7. ===============
  8. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Occludes light cast by a Light2D, casting shadows.
  10. Description
  11. -----------
  12. 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.
  13. Tutorials
  14. ---------
  15. - :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>`
  16. Properties
  17. ----------
  18. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  19. | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`occluder<class_LightOccluder2D_property_occluder>` | |
  20. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  21. | :ref:`int<class_int>` | :ref:`occluder_light_mask<class_LightOccluder2D_property_occluder_light_mask>` | ``1`` |
  22. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  23. | :ref:`bool<class_bool>` | :ref:`sdf_collision<class_LightOccluder2D_property_sdf_collision>` | ``true`` |
  24. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  25. Property Descriptions
  26. ---------------------
  27. .. _class_LightOccluder2D_property_occluder:
  28. - :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **occluder**
  29. +----------+-----------------------------+
  30. | *Setter* | set_occluder_polygon(value) |
  31. +----------+-----------------------------+
  32. | *Getter* | get_occluder_polygon() |
  33. +----------+-----------------------------+
  34. The :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` used to compute the shadow.
  35. ----
  36. .. _class_LightOccluder2D_property_occluder_light_mask:
  37. - :ref:`int<class_int>` **occluder_light_mask**
  38. +-----------+--------------------------------+
  39. | *Default* | ``1`` |
  40. +-----------+--------------------------------+
  41. | *Setter* | set_occluder_light_mask(value) |
  42. +-----------+--------------------------------+
  43. | *Getter* | get_occluder_light_mask() |
  44. +-----------+--------------------------------+
  45. The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
  46. ----
  47. .. _class_LightOccluder2D_property_sdf_collision:
  48. - :ref:`bool<class_bool>` **sdf_collision**
  49. +-----------+-----------------------------+
  50. | *Default* | ``true`` |
  51. +-----------+-----------------------------+
  52. | *Setter* | set_as_sdf_collision(value) |
  53. +-----------+-----------------------------+
  54. | *Getter* | is_set_as_sdf_collision() |
  55. +-----------+-----------------------------+
  56. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  57. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  58. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  59. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  60. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  61. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`