class_chainik3d.rst 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ChainIK3D.xml.
  6. .. _class_ChainIK3D:
  7. ChainIK3D
  8. =========
  9. **Inherits:** :ref:`IKModifier3D<class_IKModifier3D>` **<** :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`IterateIK3D<class_IterateIK3D>`, :ref:`SplineIK3D<class_SplineIK3D>`
  11. A :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` to apply inverse kinematics to bone chains containing an arbitrary number of bones.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Base class of :ref:`SkeletonModifier3D<class_SkeletonModifier3D>` that automatically generates a joint list from the bones between the root bone and the end bone.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_end_bone<class_ChainIK3D_method_get_end_bone>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  23. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`BoneDirection<enum_SkeletonModifier3D_BoneDirection>` | :ref:`get_end_bone_direction<class_ChainIK3D_method_get_end_bone_direction>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  25. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`get_end_bone_length<class_ChainIK3D_method_get_end_bone_length>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  27. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`String<class_String>` | :ref:`get_end_bone_name<class_ChainIK3D_method_get_end_bone_name>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  29. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`int<class_int>` | :ref:`get_joint_bone<class_ChainIK3D_method_get_joint_bone>`\ (\ index\: :ref:`int<class_int>`, joint\: :ref:`int<class_int>`\ ) |const| |
  31. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`String<class_String>` | :ref:`get_joint_bone_name<class_ChainIK3D_method_get_joint_bone_name>`\ (\ index\: :ref:`int<class_int>`, joint\: :ref:`int<class_int>`\ ) |const| |
  33. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`int<class_int>` | :ref:`get_joint_count<class_ChainIK3D_method_get_joint_count>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  35. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`int<class_int>` | :ref:`get_root_bone<class_ChainIK3D_method_get_root_bone>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  37. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`String<class_String>` | :ref:`get_root_bone_name<class_ChainIK3D_method_get_root_bone_name>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  39. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`bool<class_bool>` | :ref:`is_end_bone_extended<class_ChainIK3D_method_is_end_bone_extended>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  41. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`set_end_bone<class_ChainIK3D_method_set_end_bone>`\ (\ index\: :ref:`int<class_int>`, bone\: :ref:`int<class_int>`\ ) |
  43. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | |void| | :ref:`set_end_bone_direction<class_ChainIK3D_method_set_end_bone_direction>`\ (\ index\: :ref:`int<class_int>`, bone_direction\: :ref:`BoneDirection<enum_SkeletonModifier3D_BoneDirection>`\ ) |
  45. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | |void| | :ref:`set_end_bone_length<class_ChainIK3D_method_set_end_bone_length>`\ (\ index\: :ref:`int<class_int>`, length\: :ref:`float<class_float>`\ ) |
  47. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | |void| | :ref:`set_end_bone_name<class_ChainIK3D_method_set_end_bone_name>`\ (\ index\: :ref:`int<class_int>`, bone_name\: :ref:`String<class_String>`\ ) |
  49. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |void| | :ref:`set_extend_end_bone<class_ChainIK3D_method_set_extend_end_bone>`\ (\ index\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) |
  51. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | |void| | :ref:`set_root_bone<class_ChainIK3D_method_set_root_bone>`\ (\ index\: :ref:`int<class_int>`, bone\: :ref:`int<class_int>`\ ) |
  53. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | |void| | :ref:`set_root_bone_name<class_ChainIK3D_method_set_root_bone_name>`\ (\ index\: :ref:`int<class_int>`, bone_name\: :ref:`String<class_String>`\ ) |
  55. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. .. rst-class:: classref-section-separator
  57. ----
  58. .. rst-class:: classref-descriptions-group
  59. Method Descriptions
  60. -------------------
  61. .. _class_ChainIK3D_method_get_end_bone:
  62. .. rst-class:: classref-method
  63. :ref:`int<class_int>` **get_end_bone**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_end_bone>`
  64. Returns the end bone index of the bone chain.
  65. .. rst-class:: classref-item-separator
  66. ----
  67. .. _class_ChainIK3D_method_get_end_bone_direction:
  68. .. rst-class:: classref-method
  69. :ref:`BoneDirection<enum_SkeletonModifier3D_BoneDirection>` **get_end_bone_direction**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_end_bone_direction>`
  70. Returns the tail direction of the end bone of the bone chain when :ref:`is_end_bone_extended()<class_ChainIK3D_method_is_end_bone_extended>` is ``true``.
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _class_ChainIK3D_method_get_end_bone_length:
  74. .. rst-class:: classref-method
  75. :ref:`float<class_float>` **get_end_bone_length**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_end_bone_length>`
  76. Returns the end bone tail length of the bone chain when :ref:`is_end_bone_extended()<class_ChainIK3D_method_is_end_bone_extended>` is ``true``.
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_ChainIK3D_method_get_end_bone_name:
  80. .. rst-class:: classref-method
  81. :ref:`String<class_String>` **get_end_bone_name**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_end_bone_name>`
  82. Returns the end bone name of the bone chain.
  83. .. rst-class:: classref-item-separator
  84. ----
  85. .. _class_ChainIK3D_method_get_joint_bone:
  86. .. rst-class:: classref-method
  87. :ref:`int<class_int>` **get_joint_bone**\ (\ index\: :ref:`int<class_int>`, joint\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_joint_bone>`
  88. Returns the bone index at ``joint`` in the bone chain's joint list.
  89. .. rst-class:: classref-item-separator
  90. ----
  91. .. _class_ChainIK3D_method_get_joint_bone_name:
  92. .. rst-class:: classref-method
  93. :ref:`String<class_String>` **get_joint_bone_name**\ (\ index\: :ref:`int<class_int>`, joint\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_joint_bone_name>`
  94. Returns the bone name at ``joint`` in the bone chain's joint list.
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _class_ChainIK3D_method_get_joint_count:
  98. .. rst-class:: classref-method
  99. :ref:`int<class_int>` **get_joint_count**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_joint_count>`
  100. Returns the joint count of the bone chain's joint list.
  101. .. rst-class:: classref-item-separator
  102. ----
  103. .. _class_ChainIK3D_method_get_root_bone:
  104. .. rst-class:: classref-method
  105. :ref:`int<class_int>` **get_root_bone**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_root_bone>`
  106. Returns the root bone index of the bone chain.
  107. .. rst-class:: classref-item-separator
  108. ----
  109. .. _class_ChainIK3D_method_get_root_bone_name:
  110. .. rst-class:: classref-method
  111. :ref:`String<class_String>` **get_root_bone_name**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_get_root_bone_name>`
  112. Returns the root bone name of the bone chain.
  113. .. rst-class:: classref-item-separator
  114. ----
  115. .. _class_ChainIK3D_method_is_end_bone_extended:
  116. .. rst-class:: classref-method
  117. :ref:`bool<class_bool>` **is_end_bone_extended**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_ChainIK3D_method_is_end_bone_extended>`
  118. Returns ``true`` if the end bone is extended to have a tail.
  119. .. rst-class:: classref-item-separator
  120. ----
  121. .. _class_ChainIK3D_method_set_end_bone:
  122. .. rst-class:: classref-method
  123. |void| **set_end_bone**\ (\ index\: :ref:`int<class_int>`, bone\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ChainIK3D_method_set_end_bone>`
  124. Sets the end bone index of the bone chain.
  125. .. rst-class:: classref-item-separator
  126. ----
  127. .. _class_ChainIK3D_method_set_end_bone_direction:
  128. .. rst-class:: classref-method
  129. |void| **set_end_bone_direction**\ (\ index\: :ref:`int<class_int>`, bone_direction\: :ref:`BoneDirection<enum_SkeletonModifier3D_BoneDirection>`\ ) :ref:`🔗<class_ChainIK3D_method_set_end_bone_direction>`
  130. Sets the end bone tail direction of the bone chain when :ref:`is_end_bone_extended()<class_ChainIK3D_method_is_end_bone_extended>` is ``true``.
  131. .. rst-class:: classref-item-separator
  132. ----
  133. .. _class_ChainIK3D_method_set_end_bone_length:
  134. .. rst-class:: classref-method
  135. |void| **set_end_bone_length**\ (\ index\: :ref:`int<class_int>`, length\: :ref:`float<class_float>`\ ) :ref:`🔗<class_ChainIK3D_method_set_end_bone_length>`
  136. Sets the end bone tail length of the bone chain when :ref:`is_end_bone_extended()<class_ChainIK3D_method_is_end_bone_extended>` is ``true``.
  137. .. rst-class:: classref-item-separator
  138. ----
  139. .. _class_ChainIK3D_method_set_end_bone_name:
  140. .. rst-class:: classref-method
  141. |void| **set_end_bone_name**\ (\ index\: :ref:`int<class_int>`, bone_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ChainIK3D_method_set_end_bone_name>`
  142. Sets the end bone name of the bone chain.
  143. \ **Note:** The end bone must be the root bone or a child of the root bone. If they are the same, the tail must be extended by :ref:`set_extend_end_bone()<class_ChainIK3D_method_set_extend_end_bone>` to modify the bone.
  144. .. rst-class:: classref-item-separator
  145. ----
  146. .. _class_ChainIK3D_method_set_extend_end_bone:
  147. .. rst-class:: classref-method
  148. |void| **set_extend_end_bone**\ (\ index\: :ref:`int<class_int>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_ChainIK3D_method_set_extend_end_bone>`
  149. If ``enabled`` is ``true``, the end bone is extended to have a tail.
  150. The extended tail config is allocated to the last element in the joint list. In other words, if you set ``enabled`` to ``false``, the config of the last element in the joint list has no effect in the simulated result.
  151. .. rst-class:: classref-item-separator
  152. ----
  153. .. _class_ChainIK3D_method_set_root_bone:
  154. .. rst-class:: classref-method
  155. |void| **set_root_bone**\ (\ index\: :ref:`int<class_int>`, bone\: :ref:`int<class_int>`\ ) :ref:`🔗<class_ChainIK3D_method_set_root_bone>`
  156. Sets the root bone index of the bone chain.
  157. .. rst-class:: classref-item-separator
  158. ----
  159. .. _class_ChainIK3D_method_set_root_bone_name:
  160. .. rst-class:: classref-method
  161. |void| **set_root_bone_name**\ (\ index\: :ref:`int<class_int>`, bone_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_ChainIK3D_method_set_root_bone_name>`
  162. Sets the root bone name of the bone chain.
  163. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  164. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  165. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  166. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  167. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  168. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  169. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  170. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  171. .. |void| replace:: :abbr:`void (No return value.)`