class_occluderpolygon2d.rst 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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/OccluderPolygon2D.xml.
  6. .. _class_OccluderPolygon2D:
  7. OccluderPolygon2D
  8. =================
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Defines a 2D polygon for LightOccluder2D.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D<class_LightOccluder2D>`.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`closed<class_OccluderPolygon2D_property_closed>` | ``true`` |
  22. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  23. | :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` | :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>` | ``0`` |
  24. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  25. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`polygon<class_OccluderPolygon2D_property_polygon>` | ``PackedVector2Array()`` |
  26. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  27. .. rst-class:: classref-section-separator
  28. ----
  29. .. rst-class:: classref-descriptions-group
  30. Enumerations
  31. ------------
  32. .. _enum_OccluderPolygon2D_CullMode:
  33. .. rst-class:: classref-enumeration
  34. enum **CullMode**: :ref:`🔗<enum_OccluderPolygon2D_CullMode>`
  35. .. _class_OccluderPolygon2D_constant_CULL_DISABLED:
  36. .. rst-class:: classref-enumeration-constant
  37. :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **CULL_DISABLED** = ``0``
  38. Culling is disabled. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  39. .. _class_OccluderPolygon2D_constant_CULL_CLOCKWISE:
  40. .. rst-class:: classref-enumeration-constant
  41. :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **CULL_CLOCKWISE** = ``1``
  42. Culling is performed in the clockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  43. .. _class_OccluderPolygon2D_constant_CULL_COUNTER_CLOCKWISE:
  44. .. rst-class:: classref-enumeration-constant
  45. :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **CULL_COUNTER_CLOCKWISE** = ``2``
  46. Culling is performed in the counterclockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  47. .. rst-class:: classref-section-separator
  48. ----
  49. .. rst-class:: classref-descriptions-group
  50. Property Descriptions
  51. ---------------------
  52. .. _class_OccluderPolygon2D_property_closed:
  53. .. rst-class:: classref-property
  54. :ref:`bool<class_bool>` **closed** = ``true`` :ref:`🔗<class_OccluderPolygon2D_property_closed>`
  55. .. rst-class:: classref-property-setget
  56. - |void| **set_closed**\ (\ value\: :ref:`bool<class_bool>`\ )
  57. - :ref:`bool<class_bool>` **is_closed**\ (\ )
  58. If ``true``, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _class_OccluderPolygon2D_property_cull_mode:
  62. .. rst-class:: classref-property
  63. :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **cull_mode** = ``0`` :ref:`🔗<class_OccluderPolygon2D_property_cull_mode>`
  64. .. rst-class:: classref-property-setget
  65. - |void| **set_cull_mode**\ (\ value\: :ref:`CullMode<enum_OccluderPolygon2D_CullMode>`\ )
  66. - :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **get_cull_mode**\ (\ )
  67. The culling mode to use.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_OccluderPolygon2D_property_polygon:
  71. .. rst-class:: classref-property
  72. :ref:`PackedVector2Array<class_PackedVector2Array>` **polygon** = ``PackedVector2Array()`` :ref:`🔗<class_OccluderPolygon2D_property_polygon>`
  73. .. rst-class:: classref-property-setget
  74. - |void| **set_polygon**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  75. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_polygon**\ (\ )
  76. A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices positions.
  77. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details.
  78. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  79. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  80. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  81. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  82. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  83. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  84. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  85. .. |void| replace:: :abbr:`void (No return value.)`