diff options
Diffstat (limited to 'doc/classes/SurfaceTool.xml')
-rw-r--r-- | doc/classes/SurfaceTool.xml | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 7cfd8c6919..eeb6b6cd9d 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="SurfaceTool" inherits="Reference" category="Core" version="3.2"> +<class name="SurfaceTool" inherits="Reference" version="4.0"> <brief_description> Helper tool to create geometry. </brief_description> @@ -15,6 +15,8 @@ The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method add_uv] or [method add_color], then the last values would be used. Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh. Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. + See also [ArrayMesh], [ImmediateGeometry3D] and [MeshDataTool] for procedural geometry generation. + [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. </description> <tutorials> </tutorials> @@ -22,7 +24,7 @@ <method name="add_bones"> <return type="void"> </return> - <argument index="0" name="bones" type="PoolIntArray"> + <argument index="0" name="bones" type="PackedInt32Array"> </argument> <description> Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. @@ -76,15 +78,15 @@ <method name="add_triangle_fan"> <return type="void"> </return> - <argument index="0" name="vertices" type="PoolVector3Array"> + <argument index="0" name="vertices" type="PackedVector3Array"> </argument> - <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> - <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray( )"> + <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray( )"> </argument> - <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array( )"> + <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array( )"> </argument> - <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array( )"> + <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array( )"> </argument> <argument index="5" name="tangents" type="Array" default="[ ]"> </argument> @@ -123,7 +125,7 @@ <method name="add_weights"> <return type="void"> </return> - <argument index="0" name="weights" type="PoolRealArray"> + <argument index="0" name="weights" type="PackedFloat32Array"> </argument> <description> Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. @@ -163,17 +165,18 @@ </return> <argument index="0" name="existing" type="ArrayMesh" default="null"> </argument> - <argument index="1" name="flags" type="int" default="97280"> + <argument index="1" name="flags" type="int" default="31744"> </argument> <description> Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. - Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]Mesh.ARRAY_COMPRESS_*[/code] constants for other flags. + Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags. </description> </method> <method name="commit_to_arrays"> <return type="Array"> </return> <description> + Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API. </description> </method> <method name="create_from"> @@ -197,6 +200,7 @@ <argument index="2" name="blend_shape" type="String"> </argument> <description> + Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape. </description> </method> <method name="deindex"> |