class_physicsdirectbodystate2dextension.rst 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/PhysicsDirectBodyState2DExtension.xml.
  6. .. _class_PhysicsDirectBodyState2DExtension:
  7. PhysicsDirectBodyState2DExtension
  8. =================================
  9. **Inherits:** :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` **<** :ref:`Object<class_Object>`
  10. Provides virtual methods that can be overridden to create custom :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` implementations.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This class extends :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server.
  15. Intended for use with GDExtension to create custom implementations of :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>`.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`_add_constant_central_force<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_central_force>` **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| |
  23. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`_add_constant_force<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| |
  25. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`_add_constant_torque<class_PhysicsDirectBodyState2DExtension_private_method__add_constant_torque>` **(** :ref:`float<class_float>` torque **)** |virtual| |
  27. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`_apply_central_force<class_PhysicsDirectBodyState2DExtension_private_method__apply_central_force>` **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| |
  29. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`_apply_central_impulse<class_PhysicsDirectBodyState2DExtension_private_method__apply_central_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse **)** |virtual| |
  31. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`_apply_force<class_PhysicsDirectBodyState2DExtension_private_method__apply_force>` **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual| |
  33. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`_apply_impulse<class_PhysicsDirectBodyState2DExtension_private_method__apply_impulse>` **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position **)** |virtual| |
  35. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`_apply_torque<class_PhysicsDirectBodyState2DExtension_private_method__apply_torque>` **(** :ref:`float<class_float>` torque **)** |virtual| |
  37. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`_apply_torque_impulse<class_PhysicsDirectBodyState2DExtension_private_method__apply_torque_impulse>` **(** :ref:`float<class_float>` impulse **)** |virtual| |
  39. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`float<class_float>` | :ref:`_get_angular_velocity<class_PhysicsDirectBodyState2DExtension_private_method__get_angular_velocity>` **(** **)** |virtual| |const| |
  41. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`Vector2<class_Vector2>` | :ref:`_get_center_of_mass<class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass>` **(** **)** |virtual| |const| |
  43. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`Vector2<class_Vector2>` | :ref:`_get_center_of_mass_local<class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass_local>` **(** **)** |virtual| |const| |
  45. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`Vector2<class_Vector2>` | :ref:`_get_constant_force<class_PhysicsDirectBodyState2DExtension_private_method__get_constant_force>` **(** **)** |virtual| |const| |
  47. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`float<class_float>` | :ref:`_get_constant_torque<class_PhysicsDirectBodyState2DExtension_private_method__get_constant_torque>` **(** **)** |virtual| |const| |
  49. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`RID<class_RID>` | :ref:`_get_contact_collider<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  51. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`int<class_int>` | :ref:`_get_contact_collider_id<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_id>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  53. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`Object<class_Object>` | :ref:`_get_contact_collider_object<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_object>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  55. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_collider_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  57. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`_get_contact_collider_shape<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_shape>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  59. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  61. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`_get_contact_count<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_count>` **(** **)** |virtual| |const| |
  63. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_impulse<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_impulse>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  65. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_normal<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_normal>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  67. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  69. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`_get_contact_local_shape<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_shape>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  71. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`Vector2<class_Vector2>` | :ref:`_get_contact_local_velocity_at_position<class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_velocity_at_position>` **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const| |
  73. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`float<class_float>` | :ref:`_get_inverse_inertia<class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_inertia>` **(** **)** |virtual| |const| |
  75. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`float<class_float>` | :ref:`_get_inverse_mass<class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_mass>` **(** **)** |virtual| |const| |
  77. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`Vector2<class_Vector2>` | :ref:`_get_linear_velocity<class_PhysicsDirectBodyState2DExtension_private_method__get_linear_velocity>` **(** **)** |virtual| |const| |
  79. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`_get_space_state<class_PhysicsDirectBodyState2DExtension_private_method__get_space_state>` **(** **)** |virtual| |
  81. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`float<class_float>` | :ref:`_get_step<class_PhysicsDirectBodyState2DExtension_private_method__get_step>` **(** **)** |virtual| |const| |
  83. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`float<class_float>` | :ref:`_get_total_angular_damp<class_PhysicsDirectBodyState2DExtension_private_method__get_total_angular_damp>` **(** **)** |virtual| |const| |
  85. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`Vector2<class_Vector2>` | :ref:`_get_total_gravity<class_PhysicsDirectBodyState2DExtension_private_method__get_total_gravity>` **(** **)** |virtual| |const| |
  87. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`float<class_float>` | :ref:`_get_total_linear_damp<class_PhysicsDirectBodyState2DExtension_private_method__get_total_linear_damp>` **(** **)** |virtual| |const| |
  89. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`Transform2D<class_Transform2D>` | :ref:`_get_transform<class_PhysicsDirectBodyState2DExtension_private_method__get_transform>` **(** **)** |virtual| |const| |
  91. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`Vector2<class_Vector2>` | :ref:`_get_velocity_at_local_position<class_PhysicsDirectBodyState2DExtension_private_method__get_velocity_at_local_position>` **(** :ref:`Vector2<class_Vector2>` local_position **)** |virtual| |const| |
  93. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`_integrate_forces<class_PhysicsDirectBodyState2DExtension_private_method__integrate_forces>` **(** **)** |virtual| |
  95. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`bool<class_bool>` | :ref:`_is_sleeping<class_PhysicsDirectBodyState2DExtension_private_method__is_sleeping>` **(** **)** |virtual| |const| |
  97. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`_set_angular_velocity<class_PhysicsDirectBodyState2DExtension_private_method__set_angular_velocity>` **(** :ref:`float<class_float>` velocity **)** |virtual| |
  99. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`_set_constant_force<class_PhysicsDirectBodyState2DExtension_private_method__set_constant_force>` **(** :ref:`Vector2<class_Vector2>` force **)** |virtual| |
  101. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`_set_constant_torque<class_PhysicsDirectBodyState2DExtension_private_method__set_constant_torque>` **(** :ref:`float<class_float>` torque **)** |virtual| |
  103. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`_set_linear_velocity<class_PhysicsDirectBodyState2DExtension_private_method__set_linear_velocity>` **(** :ref:`Vector2<class_Vector2>` velocity **)** |virtual| |
  105. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`_set_sleep_state<class_PhysicsDirectBodyState2DExtension_private_method__set_sleep_state>` **(** :ref:`bool<class_bool>` enabled **)** |virtual| |
  107. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | void | :ref:`_set_transform<class_PhysicsDirectBodyState2DExtension_private_method__set_transform>` **(** :ref:`Transform2D<class_Transform2D>` transform **)** |virtual| |
  109. +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. .. rst-class:: classref-section-separator
  111. ----
  112. .. rst-class:: classref-descriptions-group
  113. Method Descriptions
  114. -------------------
  115. .. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_central_force:
  116. .. rst-class:: classref-method
  117. void **_add_constant_central_force** **(** :ref:`Vector2<class_Vector2>` force **)** |virtual|
  118. Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_central_force<class_PhysicsDirectBodyState2D_method_add_constant_central_force>`.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_force:
  122. .. rst-class:: classref-method
  123. void **_add_constant_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual|
  124. Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_force<class_PhysicsDirectBodyState2D_method_add_constant_force>`.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_torque:
  128. .. rst-class:: classref-method
  129. void **_add_constant_torque** **(** :ref:`float<class_float>` torque **)** |virtual|
  130. Overridable version of :ref:`PhysicsDirectBodyState2D.add_constant_torque<class_PhysicsDirectBodyState2D_method_add_constant_torque>`.
  131. .. rst-class:: classref-item-separator
  132. ----
  133. .. _class_PhysicsDirectBodyState2DExtension_private_method__apply_central_force:
  134. .. rst-class:: classref-method
  135. void **_apply_central_force** **(** :ref:`Vector2<class_Vector2>` force **)** |virtual|
  136. Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_force<class_PhysicsDirectBodyState2D_method_apply_central_force>`.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_PhysicsDirectBodyState2DExtension_private_method__apply_central_impulse:
  140. .. rst-class:: classref-method
  141. void **_apply_central_impulse** **(** :ref:`Vector2<class_Vector2>` impulse **)** |virtual|
  142. Overridable version of :ref:`PhysicsDirectBodyState2D.apply_central_impulse<class_PhysicsDirectBodyState2D_method_apply_central_impulse>`.
  143. .. rst-class:: classref-item-separator
  144. ----
  145. .. _class_PhysicsDirectBodyState2DExtension_private_method__apply_force:
  146. .. rst-class:: classref-method
  147. void **_apply_force** **(** :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position **)** |virtual|
  148. Overridable version of :ref:`PhysicsDirectBodyState2D.apply_force<class_PhysicsDirectBodyState2D_method_apply_force>`.
  149. .. rst-class:: classref-item-separator
  150. ----
  151. .. _class_PhysicsDirectBodyState2DExtension_private_method__apply_impulse:
  152. .. rst-class:: classref-method
  153. void **_apply_impulse** **(** :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position **)** |virtual|
  154. Overridable version of :ref:`PhysicsDirectBodyState2D.apply_impulse<class_PhysicsDirectBodyState2D_method_apply_impulse>`.
  155. .. rst-class:: classref-item-separator
  156. ----
  157. .. _class_PhysicsDirectBodyState2DExtension_private_method__apply_torque:
  158. .. rst-class:: classref-method
  159. void **_apply_torque** **(** :ref:`float<class_float>` torque **)** |virtual|
  160. Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque<class_PhysicsDirectBodyState2D_method_apply_torque>`.
  161. .. rst-class:: classref-item-separator
  162. ----
  163. .. _class_PhysicsDirectBodyState2DExtension_private_method__apply_torque_impulse:
  164. .. rst-class:: classref-method
  165. void **_apply_torque_impulse** **(** :ref:`float<class_float>` impulse **)** |virtual|
  166. Overridable version of :ref:`PhysicsDirectBodyState2D.apply_torque_impulse<class_PhysicsDirectBodyState2D_method_apply_torque_impulse>`.
  167. .. rst-class:: classref-item-separator
  168. ----
  169. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_angular_velocity:
  170. .. rst-class:: classref-method
  171. :ref:`float<class_float>` **_get_angular_velocity** **(** **)** |virtual| |const|
  172. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.angular_velocity<class_PhysicsDirectBodyState2D_property_angular_velocity>` and its respective getter.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass:
  176. .. rst-class:: classref-method
  177. :ref:`Vector2<class_Vector2>` **_get_center_of_mass** **(** **)** |virtual| |const|
  178. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.center_of_mass<class_PhysicsDirectBodyState2D_property_center_of_mass>` and its respective getter.
  179. .. rst-class:: classref-item-separator
  180. ----
  181. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass_local:
  182. .. rst-class:: classref-method
  183. :ref:`Vector2<class_Vector2>` **_get_center_of_mass_local** **(** **)** |virtual| |const|
  184. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.center_of_mass_local<class_PhysicsDirectBodyState2D_property_center_of_mass_local>` and its respective getter.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_constant_force:
  188. .. rst-class:: classref-method
  189. :ref:`Vector2<class_Vector2>` **_get_constant_force** **(** **)** |virtual| |const|
  190. Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_force<class_PhysicsDirectBodyState2D_method_get_constant_force>`.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_constant_torque:
  194. .. rst-class:: classref-method
  195. :ref:`float<class_float>` **_get_constant_torque** **(** **)** |virtual| |const|
  196. Overridable version of :ref:`PhysicsDirectBodyState2D.get_constant_torque<class_PhysicsDirectBodyState2D_method_get_constant_torque>`.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider:
  200. .. rst-class:: classref-method
  201. :ref:`RID<class_RID>` **_get_contact_collider** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  202. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider<class_PhysicsDirectBodyState2D_method_get_contact_collider>`.
  203. .. rst-class:: classref-item-separator
  204. ----
  205. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_id:
  206. .. rst-class:: classref-method
  207. :ref:`int<class_int>` **_get_contact_collider_id** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  208. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_id<class_PhysicsDirectBodyState2D_method_get_contact_collider_id>`.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_object:
  212. .. rst-class:: classref-method
  213. :ref:`Object<class_Object>` **_get_contact_collider_object** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  214. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_object<class_PhysicsDirectBodyState2D_method_get_contact_collider_object>`.
  215. .. rst-class:: classref-item-separator
  216. ----
  217. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_position:
  218. .. rst-class:: classref-method
  219. :ref:`Vector2<class_Vector2>` **_get_contact_collider_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  220. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_position>`.
  221. .. rst-class:: classref-item-separator
  222. ----
  223. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_shape:
  224. .. rst-class:: classref-method
  225. :ref:`int<class_int>` **_get_contact_collider_shape** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  226. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_shape<class_PhysicsDirectBodyState2D_method_get_contact_collider_shape>`.
  227. .. rst-class:: classref-item-separator
  228. ----
  229. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_velocity_at_position:
  230. .. rst-class:: classref-method
  231. :ref:`Vector2<class_Vector2>` **_get_contact_collider_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  232. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_collider_velocity_at_position>`.
  233. .. rst-class:: classref-item-separator
  234. ----
  235. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_count:
  236. .. rst-class:: classref-method
  237. :ref:`int<class_int>` **_get_contact_count** **(** **)** |virtual| |const|
  238. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_count<class_PhysicsDirectBodyState2D_method_get_contact_count>`.
  239. .. rst-class:: classref-item-separator
  240. ----
  241. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_impulse:
  242. .. rst-class:: classref-method
  243. :ref:`Vector2<class_Vector2>` **_get_contact_impulse** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  244. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_impulse<class_PhysicsDirectBodyState2D_method_get_contact_impulse>`.
  245. .. rst-class:: classref-item-separator
  246. ----
  247. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_normal:
  248. .. rst-class:: classref-method
  249. :ref:`Vector2<class_Vector2>` **_get_contact_local_normal** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  250. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_normal<class_PhysicsDirectBodyState2D_method_get_contact_local_normal>`.
  251. .. rst-class:: classref-item-separator
  252. ----
  253. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_position:
  254. .. rst-class:: classref-method
  255. :ref:`Vector2<class_Vector2>` **_get_contact_local_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  256. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_position<class_PhysicsDirectBodyState2D_method_get_contact_local_position>`.
  257. .. rst-class:: classref-item-separator
  258. ----
  259. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_shape:
  260. .. rst-class:: classref-method
  261. :ref:`int<class_int>` **_get_contact_local_shape** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  262. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_shape<class_PhysicsDirectBodyState2D_method_get_contact_local_shape>`.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_velocity_at_position:
  266. .. rst-class:: classref-method
  267. :ref:`Vector2<class_Vector2>` **_get_contact_local_velocity_at_position** **(** :ref:`int<class_int>` contact_idx **)** |virtual| |const|
  268. Overridable version of :ref:`PhysicsDirectBodyState2D.get_contact_local_velocity_at_position<class_PhysicsDirectBodyState2D_method_get_contact_local_velocity_at_position>`.
  269. .. rst-class:: classref-item-separator
  270. ----
  271. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_inertia:
  272. .. rst-class:: classref-method
  273. :ref:`float<class_float>` **_get_inverse_inertia** **(** **)** |virtual| |const|
  274. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.inverse_inertia<class_PhysicsDirectBodyState2D_property_inverse_inertia>` and its respective getter.
  275. .. rst-class:: classref-item-separator
  276. ----
  277. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_mass:
  278. .. rst-class:: classref-method
  279. :ref:`float<class_float>` **_get_inverse_mass** **(** **)** |virtual| |const|
  280. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.inverse_mass<class_PhysicsDirectBodyState2D_property_inverse_mass>` and its respective getter.
  281. .. rst-class:: classref-item-separator
  282. ----
  283. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_linear_velocity:
  284. .. rst-class:: classref-method
  285. :ref:`Vector2<class_Vector2>` **_get_linear_velocity** **(** **)** |virtual| |const|
  286. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.linear_velocity<class_PhysicsDirectBodyState2D_property_linear_velocity>` and its respective getter.
  287. .. rst-class:: classref-item-separator
  288. ----
  289. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_space_state:
  290. .. rst-class:: classref-method
  291. :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` **_get_space_state** **(** **)** |virtual|
  292. Overridable version of :ref:`PhysicsDirectBodyState2D.get_space_state<class_PhysicsDirectBodyState2D_method_get_space_state>`.
  293. .. rst-class:: classref-item-separator
  294. ----
  295. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_step:
  296. .. rst-class:: classref-method
  297. :ref:`float<class_float>` **_get_step** **(** **)** |virtual| |const|
  298. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.step<class_PhysicsDirectBodyState2D_property_step>` and its respective getter.
  299. .. rst-class:: classref-item-separator
  300. ----
  301. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_angular_damp:
  302. .. rst-class:: classref-method
  303. :ref:`float<class_float>` **_get_total_angular_damp** **(** **)** |virtual| |const|
  304. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_angular_damp<class_PhysicsDirectBodyState2D_property_total_angular_damp>` and its respective getter.
  305. .. rst-class:: classref-item-separator
  306. ----
  307. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_gravity:
  308. .. rst-class:: classref-method
  309. :ref:`Vector2<class_Vector2>` **_get_total_gravity** **(** **)** |virtual| |const|
  310. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_gravity<class_PhysicsDirectBodyState2D_property_total_gravity>` and its respective getter.
  311. .. rst-class:: classref-item-separator
  312. ----
  313. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_linear_damp:
  314. .. rst-class:: classref-method
  315. :ref:`float<class_float>` **_get_total_linear_damp** **(** **)** |virtual| |const|
  316. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.total_linear_damp<class_PhysicsDirectBodyState2D_property_total_linear_damp>` and its respective getter.
  317. .. rst-class:: classref-item-separator
  318. ----
  319. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_transform:
  320. .. rst-class:: classref-method
  321. :ref:`Transform2D<class_Transform2D>` **_get_transform** **(** **)** |virtual| |const|
  322. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.transform<class_PhysicsDirectBodyState2D_property_transform>` and its respective getter.
  323. .. rst-class:: classref-item-separator
  324. ----
  325. .. _class_PhysicsDirectBodyState2DExtension_private_method__get_velocity_at_local_position:
  326. .. rst-class:: classref-method
  327. :ref:`Vector2<class_Vector2>` **_get_velocity_at_local_position** **(** :ref:`Vector2<class_Vector2>` local_position **)** |virtual| |const|
  328. Overridable version of :ref:`PhysicsDirectBodyState2D.get_velocity_at_local_position<class_PhysicsDirectBodyState2D_method_get_velocity_at_local_position>`.
  329. .. rst-class:: classref-item-separator
  330. ----
  331. .. _class_PhysicsDirectBodyState2DExtension_private_method__integrate_forces:
  332. .. rst-class:: classref-method
  333. void **_integrate_forces** **(** **)** |virtual|
  334. Overridable version of :ref:`PhysicsDirectBodyState2D.integrate_forces<class_PhysicsDirectBodyState2D_method_integrate_forces>`.
  335. .. rst-class:: classref-item-separator
  336. ----
  337. .. _class_PhysicsDirectBodyState2DExtension_private_method__is_sleeping:
  338. .. rst-class:: classref-method
  339. :ref:`bool<class_bool>` **_is_sleeping** **(** **)** |virtual| |const|
  340. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.sleeping<class_PhysicsDirectBodyState2D_property_sleeping>` and its respective getter.
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _class_PhysicsDirectBodyState2DExtension_private_method__set_angular_velocity:
  344. .. rst-class:: classref-method
  345. void **_set_angular_velocity** **(** :ref:`float<class_float>` velocity **)** |virtual|
  346. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.angular_velocity<class_PhysicsDirectBodyState2D_property_angular_velocity>` and its respective setter.
  347. .. rst-class:: classref-item-separator
  348. ----
  349. .. _class_PhysicsDirectBodyState2DExtension_private_method__set_constant_force:
  350. .. rst-class:: classref-method
  351. void **_set_constant_force** **(** :ref:`Vector2<class_Vector2>` force **)** |virtual|
  352. Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_force<class_PhysicsDirectBodyState2D_method_set_constant_force>`.
  353. .. rst-class:: classref-item-separator
  354. ----
  355. .. _class_PhysicsDirectBodyState2DExtension_private_method__set_constant_torque:
  356. .. rst-class:: classref-method
  357. void **_set_constant_torque** **(** :ref:`float<class_float>` torque **)** |virtual|
  358. Overridable version of :ref:`PhysicsDirectBodyState2D.set_constant_torque<class_PhysicsDirectBodyState2D_method_set_constant_torque>`.
  359. .. rst-class:: classref-item-separator
  360. ----
  361. .. _class_PhysicsDirectBodyState2DExtension_private_method__set_linear_velocity:
  362. .. rst-class:: classref-method
  363. void **_set_linear_velocity** **(** :ref:`Vector2<class_Vector2>` velocity **)** |virtual|
  364. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.linear_velocity<class_PhysicsDirectBodyState2D_property_linear_velocity>` and its respective setter.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_PhysicsDirectBodyState2DExtension_private_method__set_sleep_state:
  368. .. rst-class:: classref-method
  369. void **_set_sleep_state** **(** :ref:`bool<class_bool>` enabled **)** |virtual|
  370. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.sleeping<class_PhysicsDirectBodyState2D_property_sleeping>` and its respective setter.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_PhysicsDirectBodyState2DExtension_private_method__set_transform:
  374. .. rst-class:: classref-method
  375. void **_set_transform** **(** :ref:`Transform2D<class_Transform2D>` transform **)** |virtual|
  376. Implement to override the behavior of :ref:`PhysicsDirectBodyState2D.transform<class_PhysicsDirectBodyState2D_property_transform>` and its respective setter.
  377. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  378. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  379. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  380. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  381. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  382. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  383. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`