class_noise.rst 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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. Description
  13. -----------
  14. This class defines the interface for noise generation libraries to inherit from.
  15. 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.
  16. Inheriting noise classes can optionally override this function to provide a more optimal algorithm.
  17. Methods
  18. -------
  19. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :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| |
  21. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`float<class_float>` | :ref:`get_noise_1d<class_Noise_method_get_noise_1d>` **(** :ref:`float<class_float>` x **)** |const| |
  23. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :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| |
  25. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`get_noise_2dv<class_Noise_method_get_noise_2dv>` **(** :ref:`Vector2<class_Vector2>` v **)** |const| |
  27. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :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| |
  29. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | :ref:`get_noise_3dv<class_Noise_method_get_noise_3dv>` **(** :ref:`Vector3<class_Vector3>` v **)** |const| |
  31. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :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| |
  33. +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. Method Descriptions
  35. -------------------
  36. .. _class_Noise_method_get_image:
  37. - :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|
  38. Returns a 2D :ref:`Image<class_Image>` noise image.
  39. ----
  40. .. _class_Noise_method_get_noise_1d:
  41. - :ref:`float<class_float>` **get_noise_1d** **(** :ref:`float<class_float>` x **)** |const|
  42. Returns the 1D noise value at the given (x) coordinate.
  43. ----
  44. .. _class_Noise_method_get_noise_2d:
  45. - :ref:`float<class_float>` **get_noise_2d** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)** |const|
  46. Returns the 2D noise value at the given position.
  47. ----
  48. .. _class_Noise_method_get_noise_2dv:
  49. - :ref:`float<class_float>` **get_noise_2dv** **(** :ref:`Vector2<class_Vector2>` v **)** |const|
  50. Returns the 2D noise value at the given position.
  51. ----
  52. .. _class_Noise_method_get_noise_3d:
  53. - :ref:`float<class_float>` **get_noise_3d** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y, :ref:`float<class_float>` z **)** |const|
  54. Returns the 3D noise value at the given position.
  55. ----
  56. .. _class_Noise_method_get_noise_3dv:
  57. - :ref:`float<class_float>` **get_noise_3dv** **(** :ref:`Vector3<class_Vector3>` v **)** |const|
  58. Returns the 3D noise value at the given position.
  59. ----
  60. .. _class_Noise_method_get_seamless_image:
  61. - :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|
  62. Returns a seamless 2D :ref:`Image<class_Image>` noise image.
  63. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  64. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  65. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  66. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  67. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  68. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`