Path: blob/master/modules/noise/doc_classes/Noise.xml
10278 views
<?xml version="1.0" encoding="UTF-8" ?>1<class name="Noise" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">2<brief_description>3Abstract base class for noise generators.4</brief_description>5<description>6This class defines the interface for noise generation libraries to inherit from.7A 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.8Inheriting noise classes can optionally override this function to provide a more optimal algorithm.9</description>10<tutorials>11</tutorials>12<methods>13<method name="get_image" qualifiers="const">14<return type="Image" />15<param index="0" name="width" type="int" />16<param index="1" name="height" type="int" />17<param index="2" name="invert" type="bool" default="false" />18<param index="3" name="in_3d_space" type="bool" default="false" />19<param index="4" name="normalize" type="bool" default="true" />20<description>21Returns an [Image] containing 2D noise values.22[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].23</description>24</method>25<method name="get_image_3d" qualifiers="const">26<return type="Image[]" />27<param index="0" name="width" type="int" />28<param index="1" name="height" type="int" />29<param index="2" name="depth" type="int" />30<param index="3" name="invert" type="bool" default="false" />31<param index="4" name="normalize" type="bool" default="true" />32<description>33Returns an [Array] of [Image]s containing 3D noise values for use with [method ImageTexture3D.create].34[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].35</description>36</method>37<method name="get_noise_1d" qualifiers="const">38<return type="float" />39<param index="0" name="x" type="float" />40<description>41Returns the 1D noise value at the given (x) coordinate.42</description>43</method>44<method name="get_noise_2d" qualifiers="const">45<return type="float" />46<param index="0" name="x" type="float" />47<param index="1" name="y" type="float" />48<description>49Returns the 2D noise value at the given position.50</description>51</method>52<method name="get_noise_2dv" qualifiers="const">53<return type="float" />54<param index="0" name="v" type="Vector2" />55<description>56Returns the 2D noise value at the given position.57</description>58</method>59<method name="get_noise_3d" qualifiers="const">60<return type="float" />61<param index="0" name="x" type="float" />62<param index="1" name="y" type="float" />63<param index="2" name="z" type="float" />64<description>65Returns the 3D noise value at the given position.66</description>67</method>68<method name="get_noise_3dv" qualifiers="const">69<return type="float" />70<param index="0" name="v" type="Vector3" />71<description>72Returns the 3D noise value at the given position.73</description>74</method>75<method name="get_seamless_image" qualifiers="const">76<return type="Image" />77<param index="0" name="width" type="int" />78<param index="1" name="height" type="int" />79<param index="2" name="invert" type="bool" default="false" />80<param index="3" name="in_3d_space" type="bool" default="false" />81<param index="4" name="skirt" type="float" default="0.1" />82<param index="5" name="normalize" type="bool" default="true" />83<description>84Returns an [Image] containing seamless 2D noise values.85[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].86</description>87</method>88<method name="get_seamless_image_3d" qualifiers="const">89<return type="Image[]" />90<param index="0" name="width" type="int" />91<param index="1" name="height" type="int" />92<param index="2" name="depth" type="int" />93<param index="3" name="invert" type="bool" default="false" />94<param index="4" name="skirt" type="float" default="0.1" />95<param index="5" name="normalize" type="bool" default="true" />96<description>97Returns an [Array] of [Image]s containing seamless 3D noise values for use with [method ImageTexture3D.create].98[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].99</description>100</method>101</methods>102</class>103104105