mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Sync classref with current source
This commit is contained in:
@@ -97,36 +97,48 @@ Method Descriptions
|
||||
|
||||
Adds an array of bones for the next vertex to use. ``bones`` must contain 4 integers.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_color:
|
||||
|
||||
- void **add_color** **(** :ref:`Color<class_Color>` color **)**
|
||||
|
||||
Specifies a :ref:`Color<class_Color>` for the next vertex to use.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_index:
|
||||
|
||||
- void **add_index** **(** :ref:`int<class_int>` index **)**
|
||||
|
||||
Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_normal:
|
||||
|
||||
- void **add_normal** **(** :ref:`Vector3<class_Vector3>` normal **)**
|
||||
|
||||
Specifies a normal for the next vertex to use.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_smooth_group:
|
||||
|
||||
- void **add_smooth_group** **(** :ref:`bool<class_bool>` smooth **)**
|
||||
|
||||
Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_tangent:
|
||||
|
||||
- void **add_tangent** **(** :ref:`Plane<class_Plane>` tangent **)**
|
||||
|
||||
Specifies a tangent for the next vertex to use.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_triangle_fan:
|
||||
|
||||
- void **add_triangle_fan** **(** :ref:`PoolVector3Array<class_PoolVector3Array>` vertices, :ref:`PoolVector2Array<class_PoolVector2Array>` uvs=PoolVector2Array( ), :ref:`PoolColorArray<class_PoolColorArray>` colors=PoolColorArray( ), :ref:`PoolVector2Array<class_PoolVector2Array>` uv2s=PoolVector2Array( ), :ref:`PoolVector3Array<class_PoolVector3Array>` normals=PoolVector3Array( ), :ref:`Array<class_Array>` tangents=[ ] **)**
|
||||
@@ -135,48 +147,64 @@ Inserts a triangle fan made of array data into :ref:`Mesh<class_Mesh>` being con
|
||||
|
||||
Requires the primitive type be set to :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_uv:
|
||||
|
||||
- void **add_uv** **(** :ref:`Vector2<class_Vector2>` uv **)**
|
||||
|
||||
Specifies a set of UV coordinates to use for the next vertex.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_uv2:
|
||||
|
||||
- void **add_uv2** **(** :ref:`Vector2<class_Vector2>` uv2 **)**
|
||||
|
||||
Specifies an optional second set of UV coordinates to use for the next vertex.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_vertex:
|
||||
|
||||
- void **add_vertex** **(** :ref:`Vector3<class_Vector3>` vertex **)**
|
||||
|
||||
Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV).
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_add_weights:
|
||||
|
||||
- void **add_weights** **(** :ref:`PoolRealArray<class_PoolRealArray>` weights **)**
|
||||
|
||||
Specifies weight values for next vertex to use. ``weights`` must contain 4 values.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_append_from:
|
||||
|
||||
- void **append_from** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`Transform<class_Transform>` transform **)**
|
||||
|
||||
Append vertices from a given :ref:`Mesh<class_Mesh>` surface onto the current vertex array with specified :ref:`Transform<class_Transform>`.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_begin:
|
||||
|
||||
- void **begin** **(** :ref:`PrimitiveType<enum_Mesh_PrimitiveType>` primitive **)**
|
||||
|
||||
Called before adding any vertices. Takes the primitive type as an argument (e.g. :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`).
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_clear:
|
||||
|
||||
- void **clear** **(** **)**
|
||||
|
||||
Clear all information passed into the surface tool so far.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_commit:
|
||||
|
||||
- :ref:`ArrayMesh<class_ArrayMesh>` **commit** **(** :ref:`ArrayMesh<class_ArrayMesh>` existing=null, :ref:`int<class_int>` flags=97280 **)**
|
||||
@@ -185,26 +213,36 @@ Returns a constructed :ref:`ArrayMesh<class_ArrayMesh>` from current information
|
||||
|
||||
Default flag is :ref:`Mesh.ARRAY_COMPRESS_DEFAULT<class_Mesh_constant_ARRAY_COMPRESS_DEFAULT>`. See ``Mesh.ARRAY_COMPRESS_*`` constants for other flags.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_commit_to_arrays:
|
||||
|
||||
- :ref:`Array<class_Array>` **commit_to_arrays** **(** **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_create_from:
|
||||
|
||||
- void **create_from** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface **)**
|
||||
|
||||
Creates a vertex array from an existing :ref:`Mesh<class_Mesh>`.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_create_from_blend_shape:
|
||||
|
||||
- void **create_from_blend_shape** **(** :ref:`Mesh<class_Mesh>` existing, :ref:`int<class_int>` surface, :ref:`String<class_String>` blend_shape **)**
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_deindex:
|
||||
|
||||
- void **deindex** **(** **)**
|
||||
|
||||
Removes the index array by expanding the vertex array.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_generate_normals:
|
||||
|
||||
- void **generate_normals** **(** :ref:`bool<class_bool>` flip=false **)**
|
||||
@@ -213,18 +251,24 @@ Generates normals from vertices so you do not have to do it manually. If ``flip`
|
||||
|
||||
Requires the primitive type to be set to :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_generate_tangents:
|
||||
|
||||
- void **generate_tangents** **(** **)**
|
||||
|
||||
Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already.
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_index:
|
||||
|
||||
- void **index** **(** **)**
|
||||
|
||||
Shrinks the vertex array by creating an index array (avoids reusing vertices).
|
||||
|
||||
----
|
||||
|
||||
.. _class_SurfaceTool_method_set_material:
|
||||
|
||||
- void **set_material** **(** :ref:`Material<class_Material>` material **)**
|
||||
|
||||
Reference in New Issue
Block a user