Debian Codegraph @

doc/classes/MeshLibrary.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="MeshLibrary" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Library of meshes.
5 </brief_description>
6 <description>
7 A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap].
8 </description>
9 <tutorials>
10 <link title="3D Kinematic Character Demo">https://godotengine.org/asset-library/asset/2739</link>
11 <link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/2748</link>
12 </tutorials>
13 <methods>
14 <method name="clear">
15 <return type="void" />
16 <description>
17 Clears the library.
18 </description>
19 </method>
20 <method name="create_item">
21 <return type="void" />
22 <param index="0" name="id" type="int" />
23 <description>
24 Creates a new item in the library with the given ID.
25 You can get an unused ID from [method get_last_unused_item_id].
26 </description>
27 </method>
28 <method name="find_item_by_name" qualifiers="const">
29 <return type="int" />
30 <param index="0" name="name" type="String" />
31 <description>
32 Returns the first item with the given name, or [code]-1[/code] if no item is found.
33 </description>
34 </method>
35 <method name="get_item_list" qualifiers="const">
36 <return type="PackedInt32Array" />
37 <description>
38 Returns the list of item IDs in use.
39 </description>
40 </method>
41 <method name="get_item_mesh" qualifiers="const">
42 <return type="Mesh" />
43 <param index="0" name="id" type="int" />
44 <description>
45 Returns the item's mesh.
46 </description>
47 </method>
48 <method name="get_item_mesh_cast_shadow" qualifiers="const">
49 <return type="int" enum="RenderingServer.ShadowCastingSetting" />
50 <param index="0" name="id" type="int" />
51 <description>
52 Returns the item's shadow casting mode.
53 </description>
54 </method>
55 <method name="get_item_mesh_transform" qualifiers="const">
56 <return type="Transform3D" />
57 <param index="0" name="id" type="int" />
58 <description>
59 Returns the transform applied to the item's mesh.
60 </description>
61 </method>
62 <method name="get_item_name" qualifiers="const">
63 <return type="String" />
64 <param index="0" name="id" type="int" />
65 <description>
66 Returns the item's name.
67 </description>
68 </method>
69 <method name="get_item_navigation_layers" qualifiers="const">
70 <return type="int" />
71 <param index="0" name="id" type="int" />
72 <description>
73 Returns the item's navigation layers bitmask.
74 </description>
75 </method>
76 <method name="get_item_navigation_mesh" qualifiers="const">
77 <return type="NavigationMesh" />
78 <param index="0" name="id" type="int" />
79 <description>
80 Returns the item's navigation mesh.
81 </description>
82 </method>
83 <method name="get_item_navigation_mesh_transform" qualifiers="const">
84 <return type="Transform3D" />
85 <param index="0" name="id" type="int" />
86 <description>
87 Returns the transform applied to the item's navigation mesh.
88 </description>
89 </method>
90 <method name="get_item_preview" qualifiers="const">
91 <return type="Texture2D" />
92 <param index="0" name="id" type="int" />
93 <description>
94 When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project.
95 </description>
96 </method>
97 <method name="get_item_shapes" qualifiers="const">
98 <return type="Array" />
99 <param index="0" name="id" type="int" />
100 <description>
101 Returns an item's collision shapes.
102 The array consists of each [Shape3D] followed by its [Transform3D].
103 </description>
104 </method>
105 <method name="get_last_unused_item_id" qualifiers="const">
106 <return type="int" />
107 <description>
108 Gets an unused ID for a new item.
109 </description>
110 </method>
111 <method name="remove_item">
112 <return type="void" />
113 <param index="0" name="id" type="int" />
114 <description>
115 Removes the item.
116 </description>
117 </method>
118 <method name="set_item_mesh">
119 <return type="void" />
120 <param index="0" name="id" type="int" />
121 <param index="1" name="mesh" type="Mesh" />
122 <description>
123 Sets the item's mesh.
124 </description>
125 </method>
126 <method name="set_item_mesh_cast_shadow">
127 <return type="void" />
128 <param index="0" name="id" type="int" />
129 <param index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting" />
130 <description>
131 Sets the item's shadow casting mode to [param shadow_casting_setting].
132 </description>
133 </method>
134 <method name="set_item_mesh_transform">
135 <return type="void" />
136 <param index="0" name="id" type="int" />
137 <param index="1" name="mesh_transform" type="Transform3D" />
138 <description>
139 Sets the transform to apply to the item's mesh.
140 </description>
141 </method>
142 <method name="set_item_name">
143 <return type="void" />
144 <param index="0" name="id" type="int" />
145 <param index="1" name="name" type="String" />
146 <description>
147 Sets the item's name.
148 This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name].
149 </description>
150 </method>
151 <method name="set_item_navigation_layers">
152 <return type="void" />
153 <param index="0" name="id" type="int" />
154 <param index="1" name="navigation_layers" type="int" />
155 <description>
156 Sets the item's navigation layers bitmask.
157 </description>
158 </method>
159 <method name="set_item_navigation_mesh">
160 <return type="void" />
161 <param index="0" name="id" type="int" />
162 <param index="1" name="navigation_mesh" type="NavigationMesh" />
163 <description>
164 Sets the item's navigation mesh.
165 </description>
166 </method>
167 <method name="set_item_navigation_mesh_transform">
168 <return type="void" />
169 <param index="0" name="id" type="int" />
170 <param index="1" name="navigation_mesh" type="Transform3D" />
171 <description>
172 Sets the transform to apply to the item's navigation mesh.
173 </description>
174 </method>
175 <method name="set_item_preview">
176 <return type="void" />
177 <param index="0" name="id" type="int" />
178 <param index="1" name="texture" type="Texture2D" />
179 <description>
180 Sets a texture to use as the item's preview icon in the editor.
181 </description>
182 </method>
183 <method name="set_item_shapes">
184 <return type="void" />
185 <param index="0" name="id" type="int" />
186 <param index="1" name="shapes" type="Array" />
187 <description>
188 Sets an item's collision shapes.
189 The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY].
190 </description>
191 </method>
192 </methods>
193 </class>