class_occluderpolygon2d.rst 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the OccluderPolygon2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_OccluderPolygon2D:
  5. OccluderPolygon2D
  6. =================
  7. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Defines a 2D polygon for LightOccluder2D.
  12. Properties
  13. ----------
  14. +--------------------------------------------------+-----------------------------------------------------+
  15. | :ref:`bool<class_bool>` | :ref:`closed<class_OccluderPolygon2D_closed>` |
  16. +--------------------------------------------------+-----------------------------------------------------+
  17. | :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` | :ref:`cull_mode<class_OccluderPolygon2D_cull_mode>` |
  18. +--------------------------------------------------+-----------------------------------------------------+
  19. | :ref:`PoolVector2Array<class_PoolVector2Array>` | :ref:`polygon<class_OccluderPolygon2D_polygon>` |
  20. +--------------------------------------------------+-----------------------------------------------------+
  21. Enumerations
  22. ------------
  23. .. _enum_OccluderPolygon2D_CullMode:
  24. enum **CullMode**:
  25. - **CULL_DISABLED** = **0** --- Culling mode for the occlusion. Disabled means no culling. See :ref:`cull_mode<class_OccluderPolygon2D_cull_mode>`.
  26. - **CULL_CLOCKWISE** = **1** --- Culling mode for the occlusion. Sets the culling to be in clockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_cull_mode>`.
  27. - **CULL_COUNTER_CLOCKWISE** = **2** --- Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_cull_mode>`.
  28. Description
  29. -----------
  30. Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D<class_LightOccluder2D>`.
  31. Property Descriptions
  32. ---------------------
  33. .. _class_OccluderPolygon2D_closed:
  34. - :ref:`bool<class_bool>` **closed**
  35. +----------+-------------------+
  36. | *Setter* | set_closed(value) |
  37. +----------+-------------------+
  38. | *Getter* | is_closed() |
  39. +----------+-------------------+
  40. 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``.
  41. .. _class_OccluderPolygon2D_cull_mode:
  42. - :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **cull_mode**
  43. +----------+----------------------+
  44. | *Setter* | set_cull_mode(value) |
  45. +----------+----------------------+
  46. | *Getter* | get_cull_mode() |
  47. +----------+----------------------+
  48. Set the direction of the occlusion culling when not ``CULL_DISABLED``. Default value ``DISABLED``.
  49. .. _class_OccluderPolygon2D_polygon:
  50. - :ref:`PoolVector2Array<class_PoolVector2Array>` **polygon**
  51. +----------+--------------------+
  52. | *Setter* | set_polygon(value) |
  53. +----------+--------------------+
  54. | *Getter* | get_polygon() |
  55. +----------+--------------------+
  56. A :ref:`Vector2<class_Vector2>` array with the index for polygon's vertices positions.