class_physicalbone.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the PhysicalBone.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_PhysicalBone:
  6. PhysicalBone
  7. ============
  8. **Inherits:** :ref:`PhysicsBody<class_PhysicsBody>` **<** :ref:`CollisionObject<class_CollisionObject>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Properties
  10. ----------
  11. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  12. | :ref:`Transform<class_Transform>` | :ref:`body_offset<class_PhysicalBone_property_body_offset>` | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  13. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  14. | :ref:`float<class_float>` | :ref:`bounce<class_PhysicalBone_property_bounce>` | ``0.0`` |
  15. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`friction<class_PhysicalBone_property_friction>` | ``1.0`` |
  17. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  18. | :ref:`float<class_float>` | :ref:`gravity_scale<class_PhysicalBone_property_gravity_scale>` | ``1.0`` |
  19. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  20. | :ref:`Transform<class_Transform>` | :ref:`joint_offset<class_PhysicalBone_property_joint_offset>` | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  21. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  22. | :ref:`JointType<enum_PhysicalBone_JointType>` | :ref:`joint_type<class_PhysicalBone_property_joint_type>` | ``0`` |
  23. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`mass<class_PhysicalBone_property_mass>` | ``1.0`` |
  25. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`weight<class_PhysicalBone_property_weight>` | ``9.8`` |
  27. +-----------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------+
  28. Methods
  29. -------
  30. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`apply_central_impulse<class_PhysicalBone_method_apply_central_impulse>` **(** :ref:`Vector3<class_Vector3>` impulse **)** |
  32. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`apply_impulse<class_PhysicalBone_method_apply_impulse>` **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` impulse **)** |
  34. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`int<class_int>` | :ref:`get_bone_id<class_PhysicalBone_method_get_bone_id>` **(** **)** |const| |
  36. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`get_simulate_physics<class_PhysicalBone_method_get_simulate_physics>` **(** **)** |
  38. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`is_simulating_physics<class_PhysicalBone_method_is_simulating_physics>` **(** **)** |
  40. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`is_static_body<class_PhysicalBone_method_is_static_body>` **(** **)** |
  42. +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. Enumerations
  44. ------------
  45. .. _enum_PhysicalBone_JointType:
  46. .. _class_PhysicalBone_constant_JOINT_TYPE_NONE:
  47. .. _class_PhysicalBone_constant_JOINT_TYPE_PIN:
  48. .. _class_PhysicalBone_constant_JOINT_TYPE_CONE:
  49. .. _class_PhysicalBone_constant_JOINT_TYPE_HINGE:
  50. .. _class_PhysicalBone_constant_JOINT_TYPE_SLIDER:
  51. .. _class_PhysicalBone_constant_JOINT_TYPE_6DOF:
  52. enum **JointType**:
  53. - **JOINT_TYPE_NONE** = **0**
  54. - **JOINT_TYPE_PIN** = **1**
  55. - **JOINT_TYPE_CONE** = **2**
  56. - **JOINT_TYPE_HINGE** = **3**
  57. - **JOINT_TYPE_SLIDER** = **4**
  58. - **JOINT_TYPE_6DOF** = **5**
  59. Property Descriptions
  60. ---------------------
  61. .. _class_PhysicalBone_property_body_offset:
  62. - :ref:`Transform<class_Transform>` **body_offset**
  63. +-----------+-----------------------------------------------------+
  64. | *Default* | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  65. +-----------+-----------------------------------------------------+
  66. | *Setter* | set_body_offset(value) |
  67. +-----------+-----------------------------------------------------+
  68. | *Getter* | get_body_offset() |
  69. +-----------+-----------------------------------------------------+
  70. ----
  71. .. _class_PhysicalBone_property_bounce:
  72. - :ref:`float<class_float>` **bounce**
  73. +-----------+-------------------+
  74. | *Default* | ``0.0`` |
  75. +-----------+-------------------+
  76. | *Setter* | set_bounce(value) |
  77. +-----------+-------------------+
  78. | *Getter* | get_bounce() |
  79. +-----------+-------------------+
  80. ----
  81. .. _class_PhysicalBone_property_friction:
  82. - :ref:`float<class_float>` **friction**
  83. +-----------+---------------------+
  84. | *Default* | ``1.0`` |
  85. +-----------+---------------------+
  86. | *Setter* | set_friction(value) |
  87. +-----------+---------------------+
  88. | *Getter* | get_friction() |
  89. +-----------+---------------------+
  90. ----
  91. .. _class_PhysicalBone_property_gravity_scale:
  92. - :ref:`float<class_float>` **gravity_scale**
  93. +-----------+--------------------------+
  94. | *Default* | ``1.0`` |
  95. +-----------+--------------------------+
  96. | *Setter* | set_gravity_scale(value) |
  97. +-----------+--------------------------+
  98. | *Getter* | get_gravity_scale() |
  99. +-----------+--------------------------+
  100. ----
  101. .. _class_PhysicalBone_property_joint_offset:
  102. - :ref:`Transform<class_Transform>` **joint_offset**
  103. +-----------+-----------------------------------------------------+
  104. | *Default* | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  105. +-----------+-----------------------------------------------------+
  106. | *Setter* | set_joint_offset(value) |
  107. +-----------+-----------------------------------------------------+
  108. | *Getter* | get_joint_offset() |
  109. +-----------+-----------------------------------------------------+
  110. ----
  111. .. _class_PhysicalBone_property_joint_type:
  112. - :ref:`JointType<enum_PhysicalBone_JointType>` **joint_type**
  113. +-----------+-----------------------+
  114. | *Default* | ``0`` |
  115. +-----------+-----------------------+
  116. | *Setter* | set_joint_type(value) |
  117. +-----------+-----------------------+
  118. | *Getter* | get_joint_type() |
  119. +-----------+-----------------------+
  120. ----
  121. .. _class_PhysicalBone_property_mass:
  122. - :ref:`float<class_float>` **mass**
  123. +-----------+-----------------+
  124. | *Default* | ``1.0`` |
  125. +-----------+-----------------+
  126. | *Setter* | set_mass(value) |
  127. +-----------+-----------------+
  128. | *Getter* | get_mass() |
  129. +-----------+-----------------+
  130. ----
  131. .. _class_PhysicalBone_property_weight:
  132. - :ref:`float<class_float>` **weight**
  133. +-----------+-------------------+
  134. | *Default* | ``9.8`` |
  135. +-----------+-------------------+
  136. | *Setter* | set_weight(value) |
  137. +-----------+-------------------+
  138. | *Getter* | get_weight() |
  139. +-----------+-------------------+
  140. Method Descriptions
  141. -------------------
  142. .. _class_PhysicalBone_method_apply_central_impulse:
  143. - void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)**
  144. ----
  145. .. _class_PhysicalBone_method_apply_impulse:
  146. - void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` impulse **)**
  147. ----
  148. .. _class_PhysicalBone_method_get_bone_id:
  149. - :ref:`int<class_int>` **get_bone_id** **(** **)** |const|
  150. ----
  151. .. _class_PhysicalBone_method_get_simulate_physics:
  152. - :ref:`bool<class_bool>` **get_simulate_physics** **(** **)**
  153. ----
  154. .. _class_PhysicalBone_method_is_simulating_physics:
  155. - :ref:`bool<class_bool>` **is_simulating_physics** **(** **)**
  156. ----
  157. .. _class_PhysicalBone_method_is_static_body:
  158. - :ref:`bool<class_bool>` **is_static_body** **(** **)**
  159. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  160. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  161. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`