class_occluderpolygon2d.rst 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the OccluderPolygon2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_OccluderPolygon2D:
  6. OccluderPolygon2D
  7. =================
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. **Category:** Core
  10. Brief Description
  11. -----------------
  12. Defines a 2D polygon for LightOccluder2D.
  13. Properties
  14. ----------
  15. +--------------------------------------------------+--------------------------------------------------------------+
  16. | :ref:`bool<class_bool>` | :ref:`closed<class_OccluderPolygon2D_property_closed>` |
  17. +--------------------------------------------------+--------------------------------------------------------------+
  18. | :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` | :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>` |
  19. +--------------------------------------------------+--------------------------------------------------------------+
  20. | :ref:`PoolVector2Array<class_PoolVector2Array>` | :ref:`polygon<class_OccluderPolygon2D_property_polygon>` |
  21. +--------------------------------------------------+--------------------------------------------------------------+
  22. Enumerations
  23. ------------
  24. .. _enum_OccluderPolygon2D_CullMode:
  25. .. _class_OccluderPolygon2D_constant_CULL_DISABLED:
  26. .. _class_OccluderPolygon2D_constant_CULL_CLOCKWISE:
  27. .. _class_OccluderPolygon2D_constant_CULL_COUNTER_CLOCKWISE:
  28. enum **CullMode**:
  29. - **CULL_DISABLED** = **0** --- Culling mode for the occlusion. Disabled means no culling. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  30. - **CULL_CLOCKWISE** = **1** --- Culling mode for the occlusion. Sets the culling to be in clockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  31. - **CULL_COUNTER_CLOCKWISE** = **2** --- Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  32. Description
  33. -----------
  34. Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D<class_LightOccluder2D>`.
  35. Property Descriptions
  36. ---------------------
  37. .. _class_OccluderPolygon2D_property_closed:
  38. - :ref:`bool<class_bool>` **closed**
  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. Default value: ``true``.
  45. ----
  46. .. _class_OccluderPolygon2D_property_cull_mode:
  47. - :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **cull_mode**
  48. +----------+----------------------+
  49. | *Setter* | set_cull_mode(value) |
  50. +----------+----------------------+
  51. | *Getter* | get_cull_mode() |
  52. +----------+----------------------+
  53. Set the direction of the occlusion culling or disable it. Default value: :ref:`CULL_DISABLED<class_OccluderPolygon2D_constant_CULL_DISABLED>`.
  54. ----
  55. .. _class_OccluderPolygon2D_property_polygon:
  56. - :ref:`PoolVector2Array<class_PoolVector2Array>` **polygon**
  57. +----------+--------------------+
  58. | *Setter* | set_polygon(value) |
  59. +----------+--------------------+
  60. | *Getter* | get_polygon() |
  61. +----------+--------------------+
  62. A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference.