class_physicalbone.rst 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.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. Enumerations
  42. ------------
  43. .. _enum_PhysicalBone_JointType:
  44. .. _class_PhysicalBone_constant_JOINT_TYPE_NONE:
  45. .. _class_PhysicalBone_constant_JOINT_TYPE_PIN:
  46. .. _class_PhysicalBone_constant_JOINT_TYPE_CONE:
  47. .. _class_PhysicalBone_constant_JOINT_TYPE_HINGE:
  48. .. _class_PhysicalBone_constant_JOINT_TYPE_SLIDER:
  49. .. _class_PhysicalBone_constant_JOINT_TYPE_6DOF:
  50. enum **JointType**:
  51. - **JOINT_TYPE_NONE** = **0**
  52. - **JOINT_TYPE_PIN** = **1**
  53. - **JOINT_TYPE_CONE** = **2**
  54. - **JOINT_TYPE_HINGE** = **3**
  55. - **JOINT_TYPE_SLIDER** = **4**
  56. - **JOINT_TYPE_6DOF** = **5**
  57. Property Descriptions
  58. ---------------------
  59. .. _class_PhysicalBone_property_body_offset:
  60. - :ref:`Transform<class_Transform>` **body_offset**
  61. +-----------+-----------------------------------------------------+
  62. | *Default* | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  63. +-----------+-----------------------------------------------------+
  64. | *Setter* | set_body_offset(value) |
  65. +-----------+-----------------------------------------------------+
  66. | *Getter* | get_body_offset() |
  67. +-----------+-----------------------------------------------------+
  68. ----
  69. .. _class_PhysicalBone_property_bounce:
  70. - :ref:`float<class_float>` **bounce**
  71. +-----------+-------------------+
  72. | *Default* | ``0.0`` |
  73. +-----------+-------------------+
  74. | *Setter* | set_bounce(value) |
  75. +-----------+-------------------+
  76. | *Getter* | get_bounce() |
  77. +-----------+-------------------+
  78. ----
  79. .. _class_PhysicalBone_property_friction:
  80. - :ref:`float<class_float>` **friction**
  81. +-----------+---------------------+
  82. | *Default* | ``1.0`` |
  83. +-----------+---------------------+
  84. | *Setter* | set_friction(value) |
  85. +-----------+---------------------+
  86. | *Getter* | get_friction() |
  87. +-----------+---------------------+
  88. ----
  89. .. _class_PhysicalBone_property_gravity_scale:
  90. - :ref:`float<class_float>` **gravity_scale**
  91. +-----------+--------------------------+
  92. | *Default* | ``1.0`` |
  93. +-----------+--------------------------+
  94. | *Setter* | set_gravity_scale(value) |
  95. +-----------+--------------------------+
  96. | *Getter* | get_gravity_scale() |
  97. +-----------+--------------------------+
  98. ----
  99. .. _class_PhysicalBone_property_joint_offset:
  100. - :ref:`Transform<class_Transform>` **joint_offset**
  101. +-----------+-----------------------------------------------------+
  102. | *Default* | ``Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )`` |
  103. +-----------+-----------------------------------------------------+
  104. | *Setter* | set_joint_offset(value) |
  105. +-----------+-----------------------------------------------------+
  106. | *Getter* | get_joint_offset() |
  107. +-----------+-----------------------------------------------------+
  108. ----
  109. .. _class_PhysicalBone_property_joint_type:
  110. - :ref:`JointType<enum_PhysicalBone_JointType>` **joint_type**
  111. +-----------+-----------------------+
  112. | *Default* | ``0`` |
  113. +-----------+-----------------------+
  114. | *Setter* | set_joint_type(value) |
  115. +-----------+-----------------------+
  116. | *Getter* | get_joint_type() |
  117. +-----------+-----------------------+
  118. ----
  119. .. _class_PhysicalBone_property_mass:
  120. - :ref:`float<class_float>` **mass**
  121. +-----------+-----------------+
  122. | *Default* | ``1.0`` |
  123. +-----------+-----------------+
  124. | *Setter* | set_mass(value) |
  125. +-----------+-----------------+
  126. | *Getter* | get_mass() |
  127. +-----------+-----------------+
  128. ----
  129. .. _class_PhysicalBone_property_weight:
  130. - :ref:`float<class_float>` **weight**
  131. +-----------+-------------------+
  132. | *Default* | ``9.8`` |
  133. +-----------+-------------------+
  134. | *Setter* | set_weight(value) |
  135. +-----------+-------------------+
  136. | *Getter* | get_weight() |
  137. +-----------+-------------------+
  138. Method Descriptions
  139. -------------------
  140. .. _class_PhysicalBone_method_apply_central_impulse:
  141. - void **apply_central_impulse** **(** :ref:`Vector3<class_Vector3>` impulse **)**
  142. ----
  143. .. _class_PhysicalBone_method_apply_impulse:
  144. - void **apply_impulse** **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` impulse **)**
  145. ----
  146. .. _class_PhysicalBone_method_get_bone_id:
  147. - :ref:`int<class_int>` **get_bone_id** **(** **)** const
  148. ----
  149. .. _class_PhysicalBone_method_get_simulate_physics:
  150. - :ref:`bool<class_bool>` **get_simulate_physics** **(** **)**
  151. ----
  152. .. _class_PhysicalBone_method_is_simulating_physics:
  153. - :ref:`bool<class_bool>` **is_simulating_physics** **(** **)**