Noise.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Noise" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
  3. <brief_description>
  4. Abstract base class for noise generators.
  5. </brief_description>
  6. <description>
  7. This class defines the interface for noise generation libraries to inherit from.
  8. 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.
  9. Inheriting noise classes can optionally override this function to provide a more optimal algorithm.
  10. </description>
  11. <tutorials>
  12. </tutorials>
  13. <methods>
  14. <method name="get_image" qualifiers="const">
  15. <return type="Image" />
  16. <param index="0" name="width" type="int" />
  17. <param index="1" name="height" type="int" />
  18. <param index="2" name="invert" type="bool" default="false" />
  19. <param index="3" name="in_3d_space" type="bool" default="false" />
  20. <description>
  21. Returns a 2D [Image] noise image.
  22. </description>
  23. </method>
  24. <method name="get_noise_1d" qualifiers="const">
  25. <return type="float" />
  26. <param index="0" name="x" type="float" />
  27. <description>
  28. Returns the 1D noise value at the given (x) coordinate.
  29. </description>
  30. </method>
  31. <method name="get_noise_2d" qualifiers="const">
  32. <return type="float" />
  33. <param index="0" name="x" type="float" />
  34. <param index="1" name="y" type="float" />
  35. <description>
  36. Returns the 2D noise value at the given position.
  37. </description>
  38. </method>
  39. <method name="get_noise_2dv" qualifiers="const">
  40. <return type="float" />
  41. <param index="0" name="v" type="Vector2" />
  42. <description>
  43. Returns the 2D noise value at the given position.
  44. </description>
  45. </method>
  46. <method name="get_noise_3d" qualifiers="const">
  47. <return type="float" />
  48. <param index="0" name="x" type="float" />
  49. <param index="1" name="y" type="float" />
  50. <param index="2" name="z" type="float" />
  51. <description>
  52. Returns the 3D noise value at the given position.
  53. </description>
  54. </method>
  55. <method name="get_noise_3dv" qualifiers="const">
  56. <return type="float" />
  57. <param index="0" name="v" type="Vector3" />
  58. <description>
  59. Returns the 3D noise value at the given position.
  60. </description>
  61. </method>
  62. <method name="get_seamless_image" qualifiers="const">
  63. <return type="Image" />
  64. <param index="0" name="width" type="int" />
  65. <param index="1" name="height" type="int" />
  66. <param index="2" name="invert" type="bool" default="false" />
  67. <param index="3" name="in_3d_space" type="bool" default="false" />
  68. <param index="4" name="skirt" type="float" default="0.1" />
  69. <description>
  70. Returns a seamless 2D [Image] noise image.
  71. </description>
  72. </method>
  73. </methods>
  74. </class>