class_dampedspringjoint2d.rst 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_DampedSpringJoint2D:
  4. DampedSpringJoint2D
  5. ===================
  6. **Inherits:** :ref:`Joint2D<class_joint2d>` **<** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Damped spring constraint for 2D physics.
  11. Member Functions
  12. ----------------
  13. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`float<class_float>` | :ref:`get_damping<class_DampedSpringJoint2D_get_damping>` **(** **)** const |
  15. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`get_length<class_DampedSpringJoint2D_get_length>` **(** **)** const |
  17. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`float<class_float>` | :ref:`get_rest_length<class_DampedSpringJoint2D_get_rest_length>` **(** **)** const |
  19. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | :ref:`get_stiffness<class_DampedSpringJoint2D_get_stiffness>` **(** **)** const |
  21. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`set_damping<class_DampedSpringJoint2D_set_damping>` **(** :ref:`float<class_float>` damping **)** |
  23. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`set_length<class_DampedSpringJoint2D_set_length>` **(** :ref:`float<class_float>` length **)** |
  25. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`set_rest_length<class_DampedSpringJoint2D_set_rest_length>` **(** :ref:`float<class_float>` rest_length **)** |
  27. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  28. | void | :ref:`set_stiffness<class_DampedSpringJoint2D_set_stiffness>` **(** :ref:`float<class_float>` stiffness **)** |
  29. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  30. Description
  31. -----------
  32. Damped spring constraint for 2D physics. This resembles a spring joint that always wants to go back to a given length.
  33. Member Function Description
  34. ---------------------------
  35. .. _class_DampedSpringJoint2D_get_damping:
  36. - :ref:`float<class_float>` **get_damping** **(** **)** const
  37. Return the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
  38. .. _class_DampedSpringJoint2D_get_length:
  39. - :ref:`float<class_float>` **get_length** **(** **)** const
  40. Return the maximum length of the spring joint.
  41. .. _class_DampedSpringJoint2D_get_rest_length:
  42. - :ref:`float<class_float>` **get_rest_length** **(** **)** const
  43. Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
  44. .. _class_DampedSpringJoint2D_get_stiffness:
  45. - :ref:`float<class_float>` **get_stiffness** **(** **)** const
  46. Return the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.
  47. .. _class_DampedSpringJoint2D_set_damping:
  48. - void **set_damping** **(** :ref:`float<class_float>` damping **)**
  49. Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping).
  50. .. _class_DampedSpringJoint2D_set_length:
  51. - void **set_length** **(** :ref:`float<class_float>` length **)**
  52. Set the maximum length of the spring joint.
  53. .. _class_DampedSpringJoint2D_set_rest_length:
  54. - void **set_rest_length** **(** :ref:`float<class_float>` rest_length **)**
  55. Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
  56. .. _class_DampedSpringJoint2D_set_stiffness:
  57. - void **set_stiffness** **(** :ref:`float<class_float>` stiffness **)**
  58. Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length.