summaryrefslogtreecommitdiff
path: root/doc/classes/ImmediateGeometry.xml
blob: 1cb86bc07f1020dc25cf6548a151be17555b6c37 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ImmediateGeometry" inherits="GeometryInstance" category="Core" version="3.1-dev">
	<brief_description>
		Draws simple geometry from code.
	</brief_description>
	<description>
		Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x.
	</description>
	<tutorials>
	</tutorials>
	<demos>
	</demos>
	<methods>
		<method name="add_sphere">
			<return type="void">
			</return>
			<argument index="0" name="lats" type="int">
			</argument>
			<argument index="1" name="lons" type="int">
			</argument>
			<argument index="2" name="radius" type="float">
			</argument>
			<argument index="3" name="add_uv" type="bool" default="true">
			</argument>
			<description>
				Simple helper to draw a uvsphere, with given latitudes, longitude and radius.
			</description>
		</method>
		<method name="add_vertex">
			<return type="void">
			</return>
			<argument index="0" name="position" type="Vector3">
			</argument>
			<description>
				Adds a vertex with the currently set color/uv/etc.
			</description>
		</method>
		<method name="begin">
			<return type="void">
			</return>
			<argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
			</argument>
			<argument index="1" name="texture" type="Texture" default="null">
			</argument>
			<description>
				Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references.
			For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations.
			</description>
		</method>
		<method name="clear">
			<return type="void">
			</return>
			<description>
				Clears everything that was drawn using begin/end.
			</description>
		</method>
		<method name="end">
			<return type="void">
			</return>
			<description>
				Ends a drawing context and displays the results.
			</description>
		</method>
		<method name="set_color">
			<return type="void">
			</return>
			<argument index="0" name="color" type="Color">
			</argument>
			<description>
				The current drawing color.
			</description>
		</method>
		<method name="set_normal">
			<return type="void">
			</return>
			<argument index="0" name="normal" type="Vector3">
			</argument>
			<description>
				The next vertex's normal.
			</description>
		</method>
		<method name="set_tangent">
			<return type="void">
			</return>
			<argument index="0" name="tangent" type="Plane">
			</argument>
			<description>
				The next vertex's tangent (and binormal facing).
			</description>
		</method>
		<method name="set_uv">
			<return type="void">
			</return>
			<argument index="0" name="uv" type="Vector2">
			</argument>
			<description>
				The next vertex's UV.
			</description>
		</method>
		<method name="set_uv2">
			<return type="void">
			</return>
			<argument index="0" name="uv" type="Vector2">
			</argument>
			<description>
				The next vertex's second layer UV.
			</description>
		</method>
	</methods>
	<constants>
	</constants>
</class>