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