diff options
Diffstat (limited to 'doc/classes/Mesh.xml')
-rw-r--r-- | doc/classes/Mesh.xml | 81 |
1 files changed, 54 insertions, 27 deletions
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 2b24901fe2..d3d5a7bfaa 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -25,7 +25,7 @@ </method> <method name="_get_blend_shape_name" qualifiers="virtual const"> <return type="StringName" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> @@ -36,79 +36,79 @@ </method> <method name="_set_blend_shape_name" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="index" type="int" /> - <argument index="1" name="name" type="StringName" /> + <param index="0" name="index" type="int" /> + <param index="1" name="name" type="StringName" /> <description> </description> </method> <method name="_surface_get_array_index_len" qualifiers="virtual const"> <return type="int" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_get_array_len" qualifiers="virtual const"> <return type="int" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_get_arrays" qualifiers="virtual const"> <return type="Array" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_get_blend_shape_arrays" qualifiers="virtual const"> - <return type="Array" /> - <argument index="0" name="index" type="int" /> + <return type="Array[]" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_get_format" qualifiers="virtual const"> <return type="int" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_get_lods" qualifiers="virtual const"> <return type="Dictionary" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_get_material" qualifiers="virtual const"> <return type="Material" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_get_primitive_type" qualifiers="virtual const"> <return type="int" /> - <argument index="0" name="index" type="int" /> + <param index="0" name="index" type="int" /> <description> </description> </method> <method name="_surface_set_material" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="index" type="int" /> - <argument index="1" name="material" type="Material" /> + <param index="0" name="index" type="int" /> + <param index="1" name="material" type="Material" /> <description> </description> </method> <method name="create_convex_shape" qualifiers="const"> <return type="Shape3D" /> - <argument index="0" name="clean" type="bool" default="true" /> - <argument index="1" name="simplify" type="bool" default="false" /> + <param index="0" name="clean" type="bool" default="true" /> + <param index="1" name="simplify" type="bool" default="false" /> <description> Calculate a [ConvexPolygonShape3D] from the mesh. - If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. - If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default. + If [param clean] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. + If [param simplify] is [code]true[/code], the geometry can be further simplified to reduce the number of vertices. Disabled by default. </description> </method> <method name="create_outline" qualifiers="const"> <return type="Mesh" /> - <argument index="0" name="margin" type="float" /> + <param index="0" name="margin" type="float" /> <description> Calculate an outline mesh at a defined offset (margin) from the original mesh. [b]Note:[/b] This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise). @@ -123,7 +123,7 @@ <method name="generate_triangle_mesh" qualifiers="const"> <return type="TriangleMesh" /> <description> - Generate a [TriangleMesh] from the mesh. + Generate a [TriangleMesh] from the mesh. Considers only surfaces using one of these primitive types: [constant PRIMITIVE_TRIANGLES], [constant PRIMITIVE_TRIANGLE_STRIP]. </description> </method> <method name="get_aabb" qualifiers="const"> @@ -142,34 +142,34 @@ <method name="get_surface_count" qualifiers="const"> <return type="int" /> <description> - Returns the amount of surfaces that the [Mesh] holds. + Returns the number of surfaces that the [Mesh] holds. </description> </method> <method name="surface_get_arrays" qualifiers="const"> <return type="Array" /> - <argument index="0" name="surf_idx" type="int" /> + <param index="0" name="surf_idx" type="int" /> <description> Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]). </description> </method> <method name="surface_get_blend_shape_arrays" qualifiers="const"> - <return type="Array" /> - <argument index="0" name="surf_idx" type="int" /> + <return type="Array[]" /> + <param index="0" name="surf_idx" type="int" /> <description> Returns the blend shape arrays for the requested surface. </description> </method> <method name="surface_get_material" qualifiers="const"> <return type="Material" /> - <argument index="0" name="surf_idx" type="int" /> + <param index="0" name="surf_idx" type="int" /> <description> Returns a [Material] in a given surface. Surface is rendered using this material. </description> </method> <method name="surface_set_material"> <return type="void" /> - <argument index="0" name="surf_idx" type="int" /> - <argument index="1" name="material" type="Material" /> + <param index="0" name="surf_idx" type="int" /> + <param index="1" name="material" type="Material" /> <description> Sets a [Material] for a given surface. Surface will be rendered using this material. </description> @@ -215,12 +215,16 @@ [PackedVector2Array] for second UV coordinates. </constant> <constant name="ARRAY_CUSTOM0" value="6" enum="ArrayType"> + Contains custom color channel 0. [PackedByteArray] if [code](format >> [constant ARRAY_FORMAT_CUSTOM0_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. </constant> <constant name="ARRAY_CUSTOM1" value="7" enum="ArrayType"> + Contains custom color channel 1. [PackedByteArray] if [code](format >> [constant ARRAY_FORMAT_CUSTOM1_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. </constant> <constant name="ARRAY_CUSTOM2" value="8" enum="ArrayType"> + Contains custom color channel 2. [PackedByteArray] if [code](format >> [constant ARRAY_FORMAT_CUSTOM2_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. </constant> <constant name="ARRAY_CUSTOM3" value="9" enum="ArrayType"> + Contains custom color channel 3. [PackedByteArray] if [code](format >> [constant ARRAY_FORMAT_CUSTOM3_SHIFT]) & [constant ARRAY_FORMAT_CUSTOM_MASK])[/code] is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RG_HALF] or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. </constant> <constant name="ARRAY_BONES" value="10" enum="ArrayType"> [PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element is a group of 4 numbers. @@ -236,20 +240,28 @@ Represents the size of the [enum ArrayType] enum. </constant> <constant name="ARRAY_CUSTOM_RGBA8_UNORM" value="0" enum="ArrayCustomFormat"> + Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as [PackedByteArray]. </constant> <constant name="ARRAY_CUSTOM_RGBA8_SNORM" value="1" enum="ArrayCustomFormat"> + Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as [PackedByteArray]. </constant> <constant name="ARRAY_CUSTOM_RG_HALF" value="2" enum="ArrayCustomFormat"> + Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray]. Only red and green channels are used. </constant> <constant name="ARRAY_CUSTOM_RGBA_HALF" value="3" enum="ArrayCustomFormat"> + Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray]. </constant> <constant name="ARRAY_CUSTOM_R_FLOAT" value="4" enum="ArrayCustomFormat"> + Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only the red green channel is used. </constant> <constant name="ARRAY_CUSTOM_RG_FLOAT" value="5" enum="ArrayCustomFormat"> + Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red and green channels are used. </constant> <constant name="ARRAY_CUSTOM_RGB_FLOAT" value="6" enum="ArrayCustomFormat"> + Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red, green and blue channels are used. </constant> <constant name="ARRAY_CUSTOM_RGBA_FLOAT" value="7" enum="ArrayCustomFormat"> + Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. </constant> <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat"> Represents the size of the [enum ArrayCustomFormat] enum. @@ -273,12 +285,16 @@ Mesh array contains second UV. </constant> <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat"> + Mesh array contains custom channel index 0. </constant> <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat"> + Mesh array contains custom channel index 1. </constant> <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat"> + Mesh array contains custom channel index 2. </constant> <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat"> + Mesh array contains custom channel index 3. </constant> <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat"> Mesh array contains bones. @@ -290,29 +306,40 @@ Mesh array uses indices. </constant> <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat"> + Mask of mesh channels permitted in blend shapes. </constant> <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> + Shift of first custom channel. </constant> <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat"> + Number of format bits per custom channel. See [enum ArrayCustomFormat]. </constant> <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> + Amount to shift [enum ArrayCustomFormat] for custom channel index 0. </constant> <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> + Amount to shift [enum ArrayCustomFormat] for custom channel index 1. </constant> <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat"> + Amount to shift [enum ArrayCustomFormat] for custom channel index 2. </constant> <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat"> + Amount to shift [enum ArrayCustomFormat] for custom channel index 3. </constant> <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat"> + Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [enum ArrayCustomFormat]. </constant> <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat"> + Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit]. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. </constant> <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat"> + Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan. </constant> <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat"> + Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> Blend shapes are normalized. |