diff options
Diffstat (limited to 'doc/classes/ArrayMesh.xml')
-rw-r--r-- | doc/classes/ArrayMesh.xml | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 9ea76e2702..1e2478dd14 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.1-dev"> +<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.1"> <brief_description> </brief_description> <description> @@ -26,29 +26,35 @@ </argument> <argument index="2" name="blend_shapes" type="Array" default="[ ]"> </argument> - <argument index="3" name="compress_flags" type="int" default="97792"> + <argument index="3" name="compress_flags" type="int" default="97280"> </argument> <description> - Create a new surface ([method get_surface_count] that will become surf_idx for this. - Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. (As a note, when using indices, it is recommended to only use just points, lines or triangles). + Creates a new surface. + Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See [Mesh] for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). [method get_surface_count] will become the surf_idx for this new surface. + The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [code]ARRAY_INDEX[/code] if it is used. + Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices. + Godot uses clockwise winding order for front faces of triangle primitive modes. </description> </method> <method name="center_geometry"> <return type="void"> </return> <description> + Centers the geometry. </description> </method> <method name="clear_blend_shapes"> <return type="void"> </return> <description> + Remove all blend shapes from this [code]ArrayMesh[/code]. </description> </method> <method name="get_blend_shape_count" qualifiers="const"> <return type="int"> </return> <description> + Returns the number of blend shapes that the [code]ArrayMesh[/code] holds. </description> </method> <method name="get_blend_shape_name" qualifiers="const"> @@ -57,6 +63,7 @@ <argument index="0" name="index" type="int"> </argument> <description> + Returns the name of the blend shape at this index. </description> </method> <method name="get_surface_count" qualifiers="const"> @@ -69,17 +76,28 @@ <method name="lightmap_unwrap"> <return type="int" enum="Error"> </return> - <argument index="0" name="arg0" type="Transform"> + <argument index="0" name="transform" type="Transform"> </argument> - <argument index="1" name="arg1" type="float"> + <argument index="1" name="texel_size" type="float"> </argument> <description> + Will perform a UV unwrap on the [code]ArrayMesh[/code] to prepare the mesh for lightmapping. </description> </method> <method name="regen_normalmaps"> <return type="void"> </return> <description> + Will regenerate normal maps for the [code]ArrayMesh[/code]. + </description> + </method> + <method name="surface_find_by_name" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + Return the index of the first surface with this name held within this [code]ArrayMesh[/code]. If none are found -1 is returned. </description> </method> <method name="surface_get_array_index_len" qualifiers="const"> @@ -88,7 +106,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> - Return the length in indices of the index array in the requested surface (see [method add_surface]). + Return the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_get_array_len" qualifiers="const"> @@ -97,7 +115,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> - Return the length in vertices of the vertex array in the requested surface (see [method add_surface]). + Return the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_get_arrays" qualifiers="const"> @@ -106,6 +124,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> + Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_get_blend_shape_arrays" qualifiers="const"> @@ -114,6 +133,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> + Returns the blend shape arrays for the requested surface. </description> </method> <method name="surface_get_format" qualifiers="const"> @@ -122,7 +142,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> - Return the format mask of the requested surface (see [method add_surface]). + Return the format mask of the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_get_material" qualifiers="const"> @@ -140,6 +160,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> + Get the name assigned to this surface. </description> </method> <method name="surface_get_primitive_type" qualifiers="const"> @@ -148,7 +169,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> - Return the primitive type of the requested surface (see [method add_surface]). + Return the primitive type of the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_remove"> @@ -168,6 +189,7 @@ <argument index="1" name="material" type="Material"> </argument> <description> + Set a [Material] for a given surface. Surface will be rendered using this material. </description> </method> <method name="surface_set_name"> @@ -178,7 +200,7 @@ <argument index="1" name="name" type="String"> </argument> <description> - Set a [Material] for a given surface. Surface will be rendered using this material. + Set a name for a given surface. </description> </method> <method name="surface_update_region"> @@ -198,6 +220,7 @@ <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode"> </member> <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb"> + An overriding bounding box for this mesh. </member> </members> <constants> @@ -232,7 +255,8 @@ Array of bone weights, as a float array. Each element in groups of 4 floats. </constant> <constant name="ARRAY_INDEX" value="8" enum="ArrayType"> - Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size. + [Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. + For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. </constant> <constant name="ARRAY_MAX" value="9" enum="ArrayType"> </constant> |