class_lightoccluder2d.rst 4.0 KB

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