OccluderPolygon2D.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="OccluderPolygon2D" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Defines a 2D polygon for LightOccluder2D.
  5. </brief_description>
  6. <description>
  7. Editor facility that helps you draw a 2D polygon used as resource for [LightOccluder2D].
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_cull_mode" qualifiers="const">
  15. <return type="int" enum="OccluderPolygon2D.CullMode">
  16. </return>
  17. <description>
  18. </description>
  19. </method>
  20. <method name="get_polygon" qualifiers="const">
  21. <return type="PoolVector2Array">
  22. </return>
  23. <description>
  24. </description>
  25. </method>
  26. <method name="is_closed" qualifiers="const">
  27. <return type="bool">
  28. </return>
  29. <description>
  30. </description>
  31. </method>
  32. <method name="set_closed">
  33. <return type="void">
  34. </return>
  35. <argument index="0" name="closed" type="bool">
  36. </argument>
  37. <description>
  38. </description>
  39. </method>
  40. <method name="set_cull_mode">
  41. <return type="void">
  42. </return>
  43. <argument index="0" name="cull_mode" type="int" enum="OccluderPolygon2D.CullMode">
  44. </argument>
  45. <description>
  46. </description>
  47. </method>
  48. <method name="set_polygon">
  49. <return type="void">
  50. </return>
  51. <argument index="0" name="polygon" type="PoolVector2Array">
  52. </argument>
  53. <description>
  54. </description>
  55. </method>
  56. </methods>
  57. <members>
  58. <member name="closed" type="bool" setter="set_closed" getter="is_closed">
  59. If [code]true[/code] 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 [code]true[/code].
  60. </member>
  61. <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode">
  62. Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code].
  63. </member>
  64. <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
  65. A [Vector2] array with the index for polygon's vertices positions.
  66. </member>
  67. </members>
  68. <constants>
  69. <constant name="CULL_DISABLED" value="0">
  70. Culling mode for the occlusion. Disabled means no culling. See [member cull_mode].
  71. </constant>
  72. <constant name="CULL_CLOCKWISE" value="1">
  73. Culling mode for the occlusion. Sets the culling to be in clockwise direction. See [member cull_mode].
  74. </constant>
  75. <constant name="CULL_COUNTER_CLOCKWISE" value="2">
  76. Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See [member cull_mode].
  77. </constant>
  78. </constants>
  79. </class>