class_skeletonmodification3d.rst 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 SkeletonModification3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_SkeletonModification3D:
  6. SkeletonModification3D
  7. ======================
  8. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`SkeletonModification3DCCDIK<class_SkeletonModification3DCCDIK>`, :ref:`SkeletonModification3DFABRIK<class_SkeletonModification3DFABRIK>`, :ref:`SkeletonModification3DJiggle<class_SkeletonModification3DJiggle>`, :ref:`SkeletonModification3DLookAt<class_SkeletonModification3DLookAt>`, :ref:`SkeletonModification3DStackHolder<class_SkeletonModification3DStackHolder>`, :ref:`SkeletonModification3DTwoBoneIK<class_SkeletonModification3DTwoBoneIK>`
  10. A resource that operates on bones in a :ref:`Skeleton3D<class_Skeleton3D>`.
  11. Description
  12. -----------
  13. This resource provides an interface that can be expanded so code that operates on bones in a :ref:`Skeleton3D<class_Skeleton3D>` can be mixed and matched together to create complex interactions.
  14. This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses.
  15. Properties
  16. ----------
  17. +-------------------------+-----------------------------------------------------------------------------+----------+
  18. | :ref:`bool<class_bool>` | :ref:`enabled<class_SkeletonModification3D_property_enabled>` | ``true`` |
  19. +-------------------------+-----------------------------------------------------------------------------+----------+
  20. | :ref:`int<class_int>` | :ref:`execution_mode<class_SkeletonModification3D_property_execution_mode>` | ``0`` |
  21. +-------------------------+-----------------------------------------------------------------------------+----------+
  22. Methods
  23. -------
  24. +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | void | :ref:`_execute<class_SkeletonModification3D_method__execute>` **(** :ref:`float<class_float>` delta **)** |virtual| |
  26. +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`_setup_modification<class_SkeletonModification3D_method__setup_modification>` **(** :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>` modification_stack **)** |virtual| |
  28. +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`float<class_float>` | :ref:`clamp_angle<class_SkeletonModification3D_method_clamp_angle>` **(** :ref:`float<class_float>` angle, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`bool<class_bool>` invert **)** |
  30. +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`get_is_setup<class_SkeletonModification3D_method_get_is_setup>` **(** **)** |const| |
  32. +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>` | :ref:`get_modification_stack<class_SkeletonModification3D_method_get_modification_stack>` **(** **)** |
  34. +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_is_setup<class_SkeletonModification3D_method_set_is_setup>` **(** :ref:`bool<class_bool>` is_setup **)** |
  36. +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. Property Descriptions
  38. ---------------------
  39. .. _class_SkeletonModification3D_property_enabled:
  40. - :ref:`bool<class_bool>` **enabled**
  41. +-----------+--------------------+
  42. | *Default* | ``true`` |
  43. +-----------+--------------------+
  44. | *Setter* | set_enabled(value) |
  45. +-----------+--------------------+
  46. | *Getter* | get_enabled() |
  47. +-----------+--------------------+
  48. When true, the modification's :ref:`_execute<class_SkeletonModification3D_method__execute>` function will be called by the :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>`.
  49. ----
  50. .. _class_SkeletonModification3D_property_execution_mode:
  51. - :ref:`int<class_int>` **execution_mode**
  52. +-----------+---------------------------+
  53. | *Default* | ``0`` |
  54. +-----------+---------------------------+
  55. | *Setter* | set_execution_mode(value) |
  56. +-----------+---------------------------+
  57. | *Getter* | get_execution_mode() |
  58. +-----------+---------------------------+
  59. The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes.
  60. Method Descriptions
  61. -------------------
  62. .. _class_SkeletonModification3D_method__execute:
  63. - void **_execute** **(** :ref:`float<class_float>` delta **)** |virtual|
  64. Executes the given modification. This is where the modification performs whatever function it is designed to do.
  65. ----
  66. .. _class_SkeletonModification3D_method__setup_modification:
  67. - void **_setup_modification** **(** :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>` modification_stack **)** |virtual|
  68. Sets up the modification so it can be executed. This function should be called automatically by the :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>` containing this modification.
  69. If you need to initialize a modification before use, this is the place to do it!
  70. ----
  71. .. _class_SkeletonModification3D_method_clamp_angle:
  72. - :ref:`float<class_float>` **clamp_angle** **(** :ref:`float<class_float>` angle, :ref:`float<class_float>` min, :ref:`float<class_float>` max, :ref:`bool<class_bool>` invert **)**
  73. Takes a angle and clamps it so it is within the passed-in ``min`` and ``max`` range. ``invert`` will inversely clamp the angle, clamping it to the range outside of the given bounds.
  74. ----
  75. .. _class_SkeletonModification3D_method_get_is_setup:
  76. - :ref:`bool<class_bool>` **get_is_setup** **(** **)** |const|
  77. Returns whether this modification has been successfully setup or not.
  78. ----
  79. .. _class_SkeletonModification3D_method_get_modification_stack:
  80. - :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>` **get_modification_stack** **(** **)**
  81. Returns the :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>` that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on.
  82. ----
  83. .. _class_SkeletonModification3D_method_set_is_setup:
  84. - void **set_is_setup** **(** :ref:`bool<class_bool>` is_setup **)**
  85. Manually allows you to set the setup state of the modification. This function should only rarely be used, as the :ref:`SkeletonModificationStack3D<class_SkeletonModificationStack3D>` the modification is bound to should handle setting the modification up.
  86. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  87. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  88. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  89. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  90. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  91. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`