class_lightoccluder2d.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. .. rst-class:: classref-introduction-group
  16. Tutorials
  17. ---------
  18. - :doc:`2D lights and shadows <../tutorials/2d/2d_lights_and_shadows>`
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  25. | :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`occluder<class_LightOccluder2D_property_occluder>` | |
  26. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  27. | :ref:`int<class_int>` | :ref:`occluder_light_mask<class_LightOccluder2D_property_occluder_light_mask>` | ``1`` |
  28. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  29. | :ref:`bool<class_bool>` | :ref:`sdf_collision<class_LightOccluder2D_property_sdf_collision>` | ``true`` |
  30. +---------------------------------------------------+--------------------------------------------------------------------------------+----------+
  31. .. rst-class:: classref-section-separator
  32. ----
  33. .. rst-class:: classref-descriptions-group
  34. Property Descriptions
  35. ---------------------
  36. .. _class_LightOccluder2D_property_occluder:
  37. .. rst-class:: classref-property
  38. :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **occluder**
  39. .. rst-class:: classref-property-setget
  40. - void **set_occluder_polygon** **(** :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` value **)**
  41. - :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **get_occluder_polygon** **(** **)**
  42. The :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` used to compute the shadow.
  43. .. rst-class:: classref-item-separator
  44. ----
  45. .. _class_LightOccluder2D_property_occluder_light_mask:
  46. .. rst-class:: classref-property
  47. :ref:`int<class_int>` **occluder_light_mask** = ``1``
  48. .. rst-class:: classref-property-setget
  49. - void **set_occluder_light_mask** **(** :ref:`int<class_int>` value **)**
  50. - :ref:`int<class_int>` **get_occluder_light_mask** **(** **)**
  51. The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s).
  52. .. rst-class:: classref-item-separator
  53. ----
  54. .. _class_LightOccluder2D_property_sdf_collision:
  55. .. rst-class:: classref-property
  56. :ref:`bool<class_bool>` **sdf_collision** = ``true``
  57. .. rst-class:: classref-property-setget
  58. - void **set_as_sdf_collision** **(** :ref:`bool<class_bool>` value **)**
  59. - :ref:`bool<class_bool>` **is_set_as_sdf_collision** **(** **)**
  60. If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders.
  61. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  62. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  63. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  64. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  65. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  66. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  67. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`