class_occluderpolygon2d.rst 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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_property_closed>` |
  16. +--------------------------------------------------+--------------------------------------------------------------+
  17. | :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` | :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>` |
  18. +--------------------------------------------------+--------------------------------------------------------------+
  19. | :ref:`PoolVector2Array<class_PoolVector2Array>` | :ref:`polygon<class_OccluderPolygon2D_property_polygon>` |
  20. +--------------------------------------------------+--------------------------------------------------------------+
  21. Enumerations
  22. ------------
  23. .. _enum_OccluderPolygon2D_CullMode:
  24. .. _class_OccluderPolygon2D_constant_CULL_DISABLED:
  25. .. _class_OccluderPolygon2D_constant_CULL_CLOCKWISE:
  26. .. _class_OccluderPolygon2D_constant_CULL_COUNTER_CLOCKWISE:
  27. enum **CullMode**:
  28. - **CULL_DISABLED** = **0** --- Culling mode for the occlusion. Disabled means no culling. See :ref:`cull_mode<class_OccluderPolygon2D_property_cull_mode>`.
  29. - **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>`.
  30. - **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>`.
  31. Description
  32. -----------
  33. Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D<class_LightOccluder2D>`.
  34. Property Descriptions
  35. ---------------------
  36. .. _class_OccluderPolygon2D_property_closed:
  37. - :ref:`bool<class_bool>` **closed**
  38. +----------+-------------------+
  39. | *Setter* | set_closed(value) |
  40. +----------+-------------------+
  41. | *Getter* | is_closed() |
  42. +----------+-------------------+
  43. 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``.
  44. .. _class_OccluderPolygon2D_property_cull_mode:
  45. - :ref:`CullMode<enum_OccluderPolygon2D_CullMode>` **cull_mode**
  46. +----------+----------------------+
  47. | *Setter* | set_cull_mode(value) |
  48. +----------+----------------------+
  49. | *Getter* | get_cull_mode() |
  50. +----------+----------------------+
  51. Set the direction of the occlusion culling when not ``CULL_DISABLED``. Default value ``DISABLED``.
  52. .. _class_OccluderPolygon2D_property_polygon:
  53. - :ref:`PoolVector2Array<class_PoolVector2Array>` **polygon**
  54. +----------+--------------------+
  55. | *Setter* | set_polygon(value) |
  56. +----------+--------------------+
  57. | *Getter* | get_polygon() |
  58. +----------+--------------------+
  59. 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.