2022-03-20 13:53:45 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "Noise" inherits= "Resource" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../../../doc/class.xsd" >
2022-03-20 13:53:45 +00:00
<brief_description >
Abstract base class for noise generators.
</brief_description>
<description >
This class defines the interface for noise generation libraries to inherit from.
2023-06-24 11:19:58 +00:00
A default [method get_seamless_image] implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the [method get_image] method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams.
2022-03-20 13:53:45 +00:00
Inheriting noise classes can optionally override this function to provide a more optimal algorithm.
</description>
<tutorials >
</tutorials>
<methods >
2022-04-19 17:48:25 +00:00
<method name= "get_image" qualifiers= "const" >
2022-03-20 13:53:45 +00:00
<return type= "Image" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "width" type= "int" />
<param index= "1" name= "height" type= "int" />
2023-04-28 20:19:42 +00:00
<param index= "2" name= "invert" type= "bool" default= "false" />
<param index= "3" name= "in_3d_space" type= "bool" default= "false" />
<param index= "4" name= "normalize" type= "bool" default= "true" />
<description >
Returns an [Image] containing 2D noise values.
[b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].
</description>
</method>
<method name= "get_image_3d" qualifiers= "const" >
<return type= "Image[]" />
<param index= "0" name= "width" type= "int" />
<param index= "1" name= "height" type= "int" />
2022-11-21 17:06:26 +00:00
<param index= "2" name= "depth" type= "int" />
<param index= "3" name= "invert" type= "bool" default= "false" />
2023-04-28 20:19:42 +00:00
<param index= "4" name= "normalize" type= "bool" default= "true" />
2022-03-20 13:53:45 +00:00
<description >
2023-04-28 20:19:42 +00:00
Returns an [Array] of [Image]s containing 3D noise values for use with [method ImageTexture3D.create].
[b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].
2022-03-20 13:53:45 +00:00
</description>
</method>
2022-04-19 17:48:25 +00:00
<method name= "get_noise_1d" qualifiers= "const" >
2022-03-20 13:53:45 +00:00
<return type= "float" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "x" type= "float" />
2022-03-20 13:53:45 +00:00
<description >
Returns the 1D noise value at the given (x) coordinate.
</description>
</method>
2022-04-19 17:48:25 +00:00
<method name= "get_noise_2d" qualifiers= "const" >
2022-03-20 13:53:45 +00:00
<return type= "float" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "x" type= "float" />
<param index= "1" name= "y" type= "float" />
2022-03-20 13:53:45 +00:00
<description >
Returns the 2D noise value at the given position.
</description>
</method>
2022-04-19 17:48:25 +00:00
<method name= "get_noise_2dv" qualifiers= "const" >
2022-03-20 13:53:45 +00:00
<return type= "float" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "v" type= "Vector2" />
2022-03-20 13:53:45 +00:00
<description >
Returns the 2D noise value at the given position.
</description>
</method>
2022-04-19 17:48:25 +00:00
<method name= "get_noise_3d" qualifiers= "const" >
2022-03-20 13:53:45 +00:00
<return type= "float" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "x" type= "float" />
<param index= "1" name= "y" type= "float" />
<param index= "2" name= "z" type= "float" />
2022-03-20 13:53:45 +00:00
<description >
Returns the 3D noise value at the given position.
</description>
</method>
2022-04-19 17:48:25 +00:00
<method name= "get_noise_3dv" qualifiers= "const" >
2022-03-20 13:53:45 +00:00
<return type= "float" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "v" type= "Vector3" />
2022-03-20 13:53:45 +00:00
<description >
Returns the 3D noise value at the given position.
</description>
</method>
2022-04-19 17:48:25 +00:00
<method name= "get_seamless_image" qualifiers= "const" >
2022-03-20 13:53:45 +00:00
<return type= "Image" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "width" type= "int" />
<param index= "1" name= "height" type= "int" />
2023-04-28 20:19:42 +00:00
<param index= "2" name= "invert" type= "bool" default= "false" />
<param index= "3" name= "in_3d_space" type= "bool" default= "false" />
<param index= "4" name= "skirt" type= "float" default= "0.1" />
<param index= "5" name= "normalize" type= "bool" default= "true" />
<description >
Returns an [Image] containing seamless 2D noise values.
[b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].
</description>
</method>
<method name= "get_seamless_image_3d" qualifiers= "const" >
<return type= "Image[]" />
<param index= "0" name= "width" type= "int" />
<param index= "1" name= "height" type= "int" />
2022-11-21 17:06:26 +00:00
<param index= "2" name= "depth" type= "int" />
<param index= "3" name= "invert" type= "bool" default= "false" />
2023-04-28 20:19:42 +00:00
<param index= "4" name= "skirt" type= "float" default= "0.1" />
<param index= "5" name= "normalize" type= "bool" default= "true" />
2022-03-20 13:53:45 +00:00
<description >
2023-04-28 20:19:42 +00:00
Returns an [Array] of [Image]s containing seamless 3D noise values for use with [method ImageTexture3D.create].
[b]Note:[/b] With [param normalize] set to [code]false[/code], the default implementation expects the noise generator to return values in the range [code]-1.0[/code] to [code]1.0[/code].
2022-03-20 13:53:45 +00:00
</description>
</method>
</methods>
</class>