class_noise.rst 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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/modules/noise/doc_classes/Noise.xml.
  6. .. _class_Noise:
  7. Noise
  8. =====
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`FastNoiseLite<class_FastNoiseLite>`
  11. Abstract base class for noise generators.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. This class defines the interface for noise generation libraries to inherit from.
  16. A default get_seamless_noise() implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from get_image(), reverses the quadrants of the image, then uses the strips of extra width to blend over the seams.
  17. Inheriting noise classes can optionally override this function to provide a more optimal algorithm.
  18. .. rst-class:: classref-reftable-group
  19. Methods
  20. -------
  21. .. table::
  22. :widths: auto
  23. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Image<class_Image>` | :ref:`get_image<class_Noise_method_get_image>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false **)** |const| |
  25. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`get_noise_1d<class_Noise_method_get_noise_1d>` **(** :ref:`float<class_float>` x **)** |const| |
  27. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | :ref:`get_noise_2d<class_Noise_method_get_noise_2d>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |const| |
  29. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | :ref:`get_noise_2dv<class_Noise_method_get_noise_2dv>` **(** :ref:`Vector2<class_Vector2>` v **)** |const| |
  31. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`float<class_float>` | :ref:`get_noise_3d<class_Noise_method_get_noise_3d>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z **)** |const| |
  33. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`float<class_float>` | :ref:`get_noise_3dv<class_Noise_method_get_noise_3dv>` **(** :ref:`Vector3<class_Vector3>` v **)** |const| |
  35. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`Image<class_Image>` | :ref:`get_seamless_image<class_Noise_method_get_seamless_image>` **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false, :ref:`float<class_float>` skirt=0.1 **)** |const| |
  37. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. .. rst-class:: classref-section-separator
  39. ----
  40. .. rst-class:: classref-descriptions-group
  41. Method Descriptions
  42. -------------------
  43. .. _class_Noise_method_get_image:
  44. .. rst-class:: classref-method
  45. :ref:`Image<class_Image>` **get_image** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false **)** |const|
  46. Returns a 2D :ref:`Image<class_Image>` noise image.
  47. .. rst-class:: classref-item-separator
  48. ----
  49. .. _class_Noise_method_get_noise_1d:
  50. .. rst-class:: classref-method
  51. :ref:`float<class_float>` **get_noise_1d** **(** :ref:`float<class_float>` x **)** |const|
  52. Returns the 1D noise value at the given (x) coordinate.
  53. .. rst-class:: classref-item-separator
  54. ----
  55. .. _class_Noise_method_get_noise_2d:
  56. .. rst-class:: classref-method
  57. :ref:`float<class_float>` **get_noise_2d** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |const|
  58. Returns the 2D noise value at the given position.
  59. .. rst-class:: classref-item-separator
  60. ----
  61. .. _class_Noise_method_get_noise_2dv:
  62. .. rst-class:: classref-method
  63. :ref:`float<class_float>` **get_noise_2dv** **(** :ref:`Vector2<class_Vector2>` v **)** |const|
  64. Returns the 2D noise value at the given position.
  65. .. rst-class:: classref-item-separator
  66. ----
  67. .. _class_Noise_method_get_noise_3d:
  68. .. rst-class:: classref-method
  69. :ref:`float<class_float>` **get_noise_3d** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z **)** |const|
  70. Returns the 3D noise value at the given position.
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _class_Noise_method_get_noise_3dv:
  74. .. rst-class:: classref-method
  75. :ref:`float<class_float>` **get_noise_3dv** **(** :ref:`Vector3<class_Vector3>` v **)** |const|
  76. Returns the 3D noise value at the given position.
  77. .. rst-class:: classref-item-separator
  78. ----
  79. .. _class_Noise_method_get_seamless_image:
  80. .. rst-class:: classref-method
  81. :ref:`Image<class_Image>` **get_seamless_image** **(** :ref:`int<class_int>` width, :ref:`int<class_int>` height, :ref:`bool<class_bool>` invert=false, :ref:`bool<class_bool>` in_3d_space=false, :ref:`float<class_float>` skirt=0.1 **)** |const|
  82. Returns a seamless 2D :ref:`Image<class_Image>` noise image.
  83. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  84. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  85. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  86. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  87. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  88. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`