class_occluderpolygon2d.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. Description
  12. -----------
  13. Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D<class_LightOccluder2D>`.
  14. Properties
  15. ----------
  16. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`closed<class_OccluderPolygon2D_property_closed>` | ``true`` |
  18. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  19. | :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` | :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>` | ``0`` |
  20. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  21. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`polygon<class_OccluderPolygon2D_property_polygon>` | ``PackedVector2Array()`` |
  22. +-----------------------------------------------------+--------------------------------------------------------------+--------------------------+
  23. Enumerations
  24. ------------
  25. .. _enum_OccluderPolygon2D_CullMode:
  26. .. _class_OccluderPolygon2D_constant_CULL_DISABLED:
  27. .. _class_OccluderPolygon2D_constant_CULL_CLOCKWISE:
  28. .. _class_OccluderPolygon2D_constant_CULL_COUNTER_CLOCKWISE:
  29. enum **CullMode**:
  30. - **CULL_DISABLED** = **0** --- Culling is disabled. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  31. - **CULL_CLOCKWISE** = **1** --- Culling is performed in the clockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  32. - **CULL_COUNTER_CLOCKWISE** = **2** --- Culling is performed in the counterclockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  33. Property Descriptions
  34. ---------------------
  35. .. _class_OccluderPolygon2D_property_closed:
  36. - :ref:`bool<class_bool>` **closed**
  37. +-----------+-------------------+
  38. | *Default* | ``true`` |
  39. +-----------+-------------------+
  40. | *Setter* | set_closed(value) |
  41. +-----------+-------------------+
  42. | *Getter* | is_closed() |
  43. +-----------+-------------------+
  44. 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.
  45. ----
  46. .. _class_OccluderPolygon2D_property_cull_mode:
  47. - :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **cull_mode**
  48. +-----------+----------------------+
  49. | *Default* | ``0`` |
  50. +-----------+----------------------+
  51. | *Setter* | set_cull_mode(value) |
  52. +-----------+----------------------+
  53. | *Getter* | get_cull_mode() |
  54. +-----------+----------------------+
  55. The culling mode to use.
  56. ----
  57. .. _class_OccluderPolygon2D_property_polygon:
  58. - :ref:`PackedVector2Array<class_PackedVector2Array>` **polygon**
  59. +-----------+--------------------------+
  60. | *Default* | ``PackedVector2Array()`` |
  61. +-----------+--------------------------+
  62. | *Setter* | set_polygon(value) |
  63. +-----------+--------------------------+
  64. | *Getter* | get_polygon() |
  65. +-----------+--------------------------+
  66. A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices positions.
  67. \ **Note:** The returned value is a copy of the underlying array, rather than a reference.
  68. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  69. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  70. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  71. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  72. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  73. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`