class_occluderpolygon2d.rst 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. Member Functions
  13. ----------------
  14. +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_cull_mode<class_OccluderPolygon2D_get_cull_mode>` **(** **)** const |
  16. +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`PoolVector2Array<class_poolvector2array>` | :ref:`get_polygon<class_OccluderPolygon2D_get_polygon>` **(** **)** const |
  18. +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`bool<class_bool>` | :ref:`is_closed<class_OccluderPolygon2D_is_closed>` **(** **)** const |
  20. +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set_closed<class_OccluderPolygon2D_set_closed>` **(** :ref:`bool<class_bool>` closed **)** |
  22. +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_cull_mode<class_OccluderPolygon2D_set_cull_mode>` **(** :ref:`int<class_int>` cull_mode **)** |
  24. +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`set_polygon<class_OccluderPolygon2D_set_polygon>` **(** :ref:`PoolVector2Array<class_poolvector2array>` polygon **)** |
  26. +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+
  27. Member Variables
  28. ----------------
  29. .. _class_OccluderPolygon2D_closed:
  30. - :ref:`bool<class_bool>` **closed** - 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``.
  31. .. _class_OccluderPolygon2D_cull_mode:
  32. - :ref:`int<class_int>` **cull_mode** - Set the direction of the occlusion culling when not ``CULL_DISABLED``. Default value ``DISABLED``.
  33. .. _class_OccluderPolygon2D_polygon:
  34. - :ref:`PoolVector2Array<class_poolvector2array>` **polygon** - A :ref:`Vector2<class_vector2>` array with the index for polygon's vertices positions.
  35. Numeric Constants
  36. -----------------
  37. - **CULL_DISABLED** = **0** --- Culling mode for the occlusion. Disabled means no culling. See :ref:`cull_mode<class_OccluderPolygon2D_cull_mode>`.
  38. - **CULL_CLOCKWISE** = **1** --- Culling mode for the occlusion. Sets the culling to be in clockwise direction. See :ref:`cull_mode<class_OccluderPolygon2D_cull_mode>`.
  39. - **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>`.
  40. Description
  41. -----------
  42. Editor facility that helps you draw a 2D polygon used as resource for :ref:`LightOccluder2D<class_lightoccluder2d>`.
  43. Member Function Description
  44. ---------------------------
  45. .. _class_OccluderPolygon2D_get_cull_mode:
  46. - :ref:`int<class_int>` **get_cull_mode** **(** **)** const
  47. .. _class_OccluderPolygon2D_get_polygon:
  48. - :ref:`PoolVector2Array<class_poolvector2array>` **get_polygon** **(** **)** const
  49. .. _class_OccluderPolygon2D_is_closed:
  50. - :ref:`bool<class_bool>` **is_closed** **(** **)** const
  51. .. _class_OccluderPolygon2D_set_closed:
  52. - void **set_closed** **(** :ref:`bool<class_bool>` closed **)**
  53. .. _class_OccluderPolygon2D_set_cull_mode:
  54. - void **set_cull_mode** **(** :ref:`int<class_int>` cull_mode **)**
  55. .. _class_OccluderPolygon2D_set_polygon:
  56. - void **set_polygon** **(** :ref:`PoolVector2Array<class_poolvector2array>` polygon **)**