Physics2DShapeQueryParameters.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Physics2DShapeQueryParameters" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Parameters to be sent to a 2D shape physics query.
  5. </brief_description>
  6. <description>
  7. This class contains the shape and other parameters for intersection/collision queries.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_collision_layer" qualifiers="const">
  15. <return type="int">
  16. </return>
  17. <description>
  18. Return the physics layer the shape belongs to.
  19. </description>
  20. </method>
  21. <method name="get_exclude" qualifiers="const">
  22. <return type="Array">
  23. </return>
  24. <description>
  25. Return the list of objects, or object [RID]\ s, that will be excluded from collisions.
  26. </description>
  27. </method>
  28. <method name="get_margin" qualifiers="const">
  29. <return type="float">
  30. </return>
  31. <description>
  32. Return the collision margin for the shape.
  33. </description>
  34. </method>
  35. <method name="get_motion" qualifiers="const">
  36. <return type="Vector2">
  37. </return>
  38. <description>
  39. Return the current movement speed of the shape.
  40. </description>
  41. </method>
  42. <method name="get_object_type_mask" qualifiers="const">
  43. <return type="int">
  44. </return>
  45. <description>
  46. Return the type of object the shape belongs to.
  47. </description>
  48. </method>
  49. <method name="get_shape_rid" qualifiers="const">
  50. <return type="RID">
  51. </return>
  52. <description>
  53. Return the [RID] of the shape queried.
  54. </description>
  55. </method>
  56. <method name="get_transform" qualifiers="const">
  57. <return type="Transform2D">
  58. </return>
  59. <description>
  60. Return the transform matrix of the shape queried.
  61. </description>
  62. </method>
  63. <method name="set_collision_layer">
  64. <return type="void">
  65. </return>
  66. <argument index="0" name="collision_layer" type="int">
  67. </argument>
  68. <description>
  69. Set the physics layer the shape belongs to.
  70. </description>
  71. </method>
  72. <method name="set_exclude">
  73. <return type="void">
  74. </return>
  75. <argument index="0" name="exclude" type="Array">
  76. </argument>
  77. <description>
  78. Set the list of objects, or object [RID]\ s, that will be excluded from collisions.
  79. </description>
  80. </method>
  81. <method name="set_margin">
  82. <return type="void">
  83. </return>
  84. <argument index="0" name="margin" type="float">
  85. </argument>
  86. <description>
  87. Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision.
  88. </description>
  89. </method>
  90. <method name="set_motion">
  91. <return type="void">
  92. </return>
  93. <argument index="0" name="motion" type="Vector2">
  94. </argument>
  95. <description>
  96. Set the current movement speed of the shape.
  97. </description>
  98. </method>
  99. <method name="set_object_type_mask">
  100. <return type="void">
  101. </return>
  102. <argument index="0" name="object_type_mask" type="int">
  103. </argument>
  104. <description>
  105. Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*).
  106. </description>
  107. </method>
  108. <method name="set_shape">
  109. <return type="void">
  110. </return>
  111. <argument index="0" name="shape" type="Resource">
  112. </argument>
  113. <description>
  114. Set the [Shape2D] that will be used for collision/intersection queries.
  115. </description>
  116. </method>
  117. <method name="set_shape_rid">
  118. <return type="void">
  119. </return>
  120. <argument index="0" name="shape" type="RID">
  121. </argument>
  122. <description>
  123. Set the [RID] of the shape to be used in queries.
  124. </description>
  125. </method>
  126. <method name="set_transform">
  127. <return type="void">
  128. </return>
  129. <argument index="0" name="transform" type="Transform2D">
  130. </argument>
  131. <description>
  132. Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.
  133. </description>
  134. </method>
  135. </methods>
  136. <constants>
  137. </constants>
  138. </class>