class_dampedspringjoint2d.rst 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. .. _class_DampedSpringJoint2D:
  2. DampedSpringJoint2D
  3. ===================
  4. **Inherits:** :ref:`Joint2D<class_joint2d>`
  5. **Category:** Core
  6. Damped spring constraint for 2D physics.
  7. Member Functions
  8. ----------------
  9. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  10. | void | :ref:`set_length<class_DampedSpringJoint2D_set_length>` **(** :ref:`float<class_float>` length **)** |
  11. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  12. | :ref:`float<class_float>` | :ref:`get_length<class_DampedSpringJoint2D_get_length>` **(** **)** const |
  13. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  14. | void | :ref:`set_rest_length<class_DampedSpringJoint2D_set_rest_length>` **(** :ref:`float<class_float>` rest_length **)** |
  15. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`float<class_float>` | :ref:`get_rest_length<class_DampedSpringJoint2D_get_rest_length>` **(** **)** const |
  17. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_stiffness<class_DampedSpringJoint2D_set_stiffness>` **(** :ref:`float<class_float>` stiffness **)** |
  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. | :ref:`float<class_float>` | :ref:`get_damping<class_DampedSpringJoint2D_get_damping>` **(** **)** const |
  25. +----------------------------+-----------------------------------------------------------------------------------------------------------------------+
  26. Description
  27. -----------
  28. Damped spring constraint for 2D physics. This resembles a spring joint that always want to go back to a given length.
  29. Member Function Description
  30. ---------------------------
  31. .. _class_DampedSpringJoint2D_set_length:
  32. - void **set_length** **(** :ref:`float<class_float>` length **)**
  33. Set the maximum length of the spring joint.
  34. .. _class_DampedSpringJoint2D_get_length:
  35. - :ref:`float<class_float>` **get_length** **(** **)** const
  36. Return the maximum length of the spring joint.
  37. .. _class_DampedSpringJoint2D_set_rest_length:
  38. - void **set_rest_length** **(** :ref:`float<class_float>` rest_length **)**
  39. Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
  40. .. _class_DampedSpringJoint2D_get_rest_length:
  41. - :ref:`float<class_float>` **get_rest_length** **(** **)** const
  42. Return the resting length of the spring joint. The joint will always try to go to back this length when pulled apart.
  43. .. _class_DampedSpringJoint2D_set_stiffness:
  44. - void **set_stiffness** **(** :ref:`float<class_float>` stiffness **)**
  45. Set the stiffness of the spring joint.
  46. .. _class_DampedSpringJoint2D_get_stiffness:
  47. - :ref:`float<class_float>` **get_stiffness** **(** **)** const
  48. Return the stiffness of the spring joint.
  49. .. _class_DampedSpringJoint2D_set_damping:
  50. - void **set_damping** **(** :ref:`float<class_float>` damping **)**
  51. Set the damping of the spring joint.
  52. .. _class_DampedSpringJoint2D_get_damping:
  53. - :ref:`float<class_float>` **get_damping** **(** **)** const
  54. Return the damping of the spring joint.