mirror of
https://github.com/Relintai/pandemonium_engine_docs.git
synced 2025-01-23 15:17:21 +01:00
447 lines
26 KiB
ReStructuredText
447 lines
26 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
.. Generated automatically from Godot engine sources.
|
|
.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/MeshDataTool.xml.
|
|
|
|
.. _class_MeshDataTool:
|
|
|
|
MeshDataTool
|
|
============
|
|
|
|
**Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
|
|
|
|
Helper tool to access and edit :ref:`Mesh<class_Mesh>` data.
|
|
|
|
Description
|
|
-----------
|
|
|
|
MeshDataTool provides access to individual vertices in a :ref:`Mesh<class_Mesh>`. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges.
|
|
|
|
To use MeshDataTool, load a mesh with :ref:`create_from_surface<class_MeshDataTool_method_create_from_surface>`. When you are finished editing the data commit the data to a mesh with :ref:`commit_to_surface<class_MeshDataTool_method_commit_to_surface>`.
|
|
|
|
Below is an example of how MeshDataTool may be used.
|
|
|
|
::
|
|
|
|
var mesh = ArrayMesh.new()
|
|
mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, CubeMesh.new().get_mesh_arrays())
|
|
var mdt = MeshDataTool.new()
|
|
mdt.create_from_surface(mesh, 0)
|
|
for i in range(mdt.get_vertex_count()):
|
|
var vertex = mdt.get_vertex(i)
|
|
# In this example we extend the mesh by one unit, which results in separated faces as it is flat shaded.
|
|
vertex += mdt.get_vertex_normal(i)
|
|
# Save your change.
|
|
mdt.set_vertex(i, vertex)
|
|
mesh.surface_remove(0)
|
|
mdt.commit_to_surface(mesh)
|
|
var mi = MeshInstance.new()
|
|
mi.mesh = mesh
|
|
add_child(mi)
|
|
|
|
See also :ref:`ArrayMesh<class_ArrayMesh>`, :ref:`ImmediateGeometry<class_ImmediateGeometry>` and :ref:`SurfaceTool<class_SurfaceTool>` for procedural geometry generation.
|
|
|
|
\ **Note:** Godot uses clockwise `winding order <https://learnopengl.com/Advanced-OpenGL/Face-culling>`__ for front faces of triangle primitive modes.
|
|
|
|
Methods
|
|
-------
|
|
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`clear<class_MeshDataTool_method_clear>` **(** **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`commit_to_surface<class_MeshDataTool_method_commit_to_surface>` **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`create_from_surface<class_MeshDataTool_method_create_from_surface>` **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`int<class_int>` surface **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_edge_count<class_MeshDataTool_method_get_edge_count>` **(** **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolIntArray<class_PoolIntArray>` | :ref:`get_edge_faces<class_MeshDataTool_method_get_edge_faces>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`get_edge_meta<class_MeshDataTool_method_get_edge_meta>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_edge_vertex<class_MeshDataTool_method_get_edge_vertex>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_face_count<class_MeshDataTool_method_get_face_count>` **(** **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_face_edge<class_MeshDataTool_method_get_face_edge>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` edge **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`get_face_meta<class_MeshDataTool_method_get_face_meta>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`get_face_normal<class_MeshDataTool_method_get_face_normal>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_face_vertex<class_MeshDataTool_method_get_face_vertex>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_format<class_MeshDataTool_method_get_format>` **(** **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Material<class_Material>` | :ref:`get_material<class_MeshDataTool_method_get_material>` **(** **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`get_vertex<class_MeshDataTool_method_get_vertex>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolIntArray<class_PoolIntArray>` | :ref:`get_vertex_bones<class_MeshDataTool_method_get_vertex_bones>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_Color>` | :ref:`get_vertex_color<class_MeshDataTool_method_get_vertex_color>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_vertex_count<class_MeshDataTool_method_get_vertex_count>` **(** **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolIntArray<class_PoolIntArray>` | :ref:`get_vertex_edges<class_MeshDataTool_method_get_vertex_edges>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolIntArray<class_PoolIntArray>` | :ref:`get_vertex_faces<class_MeshDataTool_method_get_vertex_faces>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Variant<class_Variant>` | :ref:`get_vertex_meta<class_MeshDataTool_method_get_vertex_meta>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`get_vertex_normal<class_MeshDataTool_method_get_vertex_normal>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Plane<class_Plane>` | :ref:`get_vertex_tangent<class_MeshDataTool_method_get_vertex_tangent>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_vertex_uv<class_MeshDataTool_method_get_vertex_uv>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector2<class_Vector2>` | :ref:`get_vertex_uv2<class_MeshDataTool_method_get_vertex_uv2>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PoolRealArray<class_PoolRealArray>` | :ref:`get_vertex_weights<class_MeshDataTool_method_get_vertex_weights>` **(** :ref:`int<class_int>` idx **)** |const| |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_edge_meta<class_MeshDataTool_method_set_edge_meta>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_face_meta<class_MeshDataTool_method_set_face_meta>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_material<class_MeshDataTool_method_set_material>` **(** :ref:`Material<class_Material>` material **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex<class_MeshDataTool_method_set_vertex>` **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vertex **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_bones<class_MeshDataTool_method_set_vertex_bones>` **(** :ref:`int<class_int>` idx, :ref:`PoolIntArray<class_PoolIntArray>` bones **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_color<class_MeshDataTool_method_set_vertex_color>` **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` color **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_meta<class_MeshDataTool_method_set_vertex_meta>` **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_normal<class_MeshDataTool_method_set_vertex_normal>` **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` normal **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_tangent<class_MeshDataTool_method_set_vertex_tangent>` **(** :ref:`int<class_int>` idx, :ref:`Plane<class_Plane>` tangent **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_uv<class_MeshDataTool_method_set_vertex_uv>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_uv2<class_MeshDataTool_method_set_vertex_uv2>` **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv2 **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_vertex_weights<class_MeshDataTool_method_set_vertex_weights>` **(** :ref:`int<class_int>` idx, :ref:`PoolRealArray<class_PoolRealArray>` weights **)** |
|
|
+-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_MeshDataTool_method_clear:
|
|
|
|
- void **clear** **(** **)**
|
|
|
|
Clears all data currently in MeshDataTool.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_commit_to_surface:
|
|
|
|
- :ref:`Error<enum_@GlobalScope_Error>` **commit_to_surface** **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh **)**
|
|
|
|
Adds a new surface to specified :ref:`Mesh<class_Mesh>` with edited data.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_create_from_surface:
|
|
|
|
- :ref:`Error<enum_@GlobalScope_Error>` **create_from_surface** **(** :ref:`ArrayMesh<class_ArrayMesh>` mesh, :ref:`int<class_int>` surface **)**
|
|
|
|
Uses specified surface of given :ref:`Mesh<class_Mesh>` to populate data for MeshDataTool.
|
|
|
|
Requires :ref:`Mesh<class_Mesh>` with primitive type :ref:`Mesh.PRIMITIVE_TRIANGLES<class_Mesh_constant_PRIMITIVE_TRIANGLES>`.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_edge_count:
|
|
|
|
- :ref:`int<class_int>` **get_edge_count** **(** **)** |const|
|
|
|
|
Returns the number of edges in this :ref:`Mesh<class_Mesh>`.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_edge_faces:
|
|
|
|
- :ref:`PoolIntArray<class_PoolIntArray>` **get_edge_faces** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns array of faces that touch given edge.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_edge_meta:
|
|
|
|
- :ref:`Variant<class_Variant>` **get_edge_meta** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns meta information assigned to given edge.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_edge_vertex:
|
|
|
|
- :ref:`int<class_int>` **get_edge_vertex** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const|
|
|
|
|
Returns index of specified vertex connected to given edge.
|
|
|
|
Vertex argument can only be 0 or 1 because edges are comprised of two vertices.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_face_count:
|
|
|
|
- :ref:`int<class_int>` **get_face_count** **(** **)** |const|
|
|
|
|
Returns the number of faces in this :ref:`Mesh<class_Mesh>`.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_face_edge:
|
|
|
|
- :ref:`int<class_int>` **get_face_edge** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` edge **)** |const|
|
|
|
|
Returns specified edge associated with given face.
|
|
|
|
Edge argument must be either 0, 1, or 2 because a face only has three edges.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_face_meta:
|
|
|
|
- :ref:`Variant<class_Variant>` **get_face_meta** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the metadata associated with the given face.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_face_normal:
|
|
|
|
- :ref:`Vector3<class_Vector3>` **get_face_normal** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Calculates and returns the face normal of the given face.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_face_vertex:
|
|
|
|
- :ref:`int<class_int>` **get_face_vertex** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` vertex **)** |const|
|
|
|
|
Returns the specified vertex of the given face.
|
|
|
|
Vertex argument must be either 0, 1, or 2 because faces contain three vertices.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_format:
|
|
|
|
- :ref:`int<class_int>` **get_format** **(** **)** |const|
|
|
|
|
Returns the :ref:`Mesh<class_Mesh>`'s format. Format is an integer made up of :ref:`Mesh<class_Mesh>` format flags combined together. For example, a mesh containing both vertices and normals would return a format of ``3`` because :ref:`ArrayMesh.ARRAY_FORMAT_VERTEX<class_ArrayMesh_constant_ARRAY_FORMAT_VERTEX>` is ``1`` and :ref:`ArrayMesh.ARRAY_FORMAT_NORMAL<class_ArrayMesh_constant_ARRAY_FORMAT_NORMAL>` is ``2``.
|
|
|
|
See :ref:`ArrayFormat<enum_ArrayMesh_ArrayFormat>` for a list of format flags.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_material:
|
|
|
|
- :ref:`Material<class_Material>` **get_material** **(** **)** |const|
|
|
|
|
Returns the material assigned to the :ref:`Mesh<class_Mesh>`.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex:
|
|
|
|
- :ref:`Vector3<class_Vector3>` **get_vertex** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the vertex at given index.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_bones:
|
|
|
|
- :ref:`PoolIntArray<class_PoolIntArray>` **get_vertex_bones** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the bones of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_color:
|
|
|
|
- :ref:`Color<class_Color>` **get_vertex_color** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the color of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_count:
|
|
|
|
- :ref:`int<class_int>` **get_vertex_count** **(** **)** |const|
|
|
|
|
Returns the total number of vertices in :ref:`Mesh<class_Mesh>`.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_edges:
|
|
|
|
- :ref:`PoolIntArray<class_PoolIntArray>` **get_vertex_edges** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns an array of edges that share the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_faces:
|
|
|
|
- :ref:`PoolIntArray<class_PoolIntArray>` **get_vertex_faces** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns an array of faces that share the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_meta:
|
|
|
|
- :ref:`Variant<class_Variant>` **get_vertex_meta** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the metadata associated with the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_normal:
|
|
|
|
- :ref:`Vector3<class_Vector3>` **get_vertex_normal** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the normal of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_tangent:
|
|
|
|
- :ref:`Plane<class_Plane>` **get_vertex_tangent** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the tangent of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_uv:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_vertex_uv** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the UV of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_uv2:
|
|
|
|
- :ref:`Vector2<class_Vector2>` **get_vertex_uv2** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns the UV2 of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_get_vertex_weights:
|
|
|
|
- :ref:`PoolRealArray<class_PoolRealArray>` **get_vertex_weights** **(** :ref:`int<class_int>` idx **)** |const|
|
|
|
|
Returns bone weights of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_edge_meta:
|
|
|
|
- void **set_edge_meta** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)**
|
|
|
|
Sets the metadata of the given edge.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_face_meta:
|
|
|
|
- void **set_face_meta** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)**
|
|
|
|
Sets the metadata of the given face.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_material:
|
|
|
|
- void **set_material** **(** :ref:`Material<class_Material>` material **)**
|
|
|
|
Sets the material to be used by newly-constructed :ref:`Mesh<class_Mesh>`.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex:
|
|
|
|
- void **set_vertex** **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` vertex **)**
|
|
|
|
Sets the position of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_bones:
|
|
|
|
- void **set_vertex_bones** **(** :ref:`int<class_int>` idx, :ref:`PoolIntArray<class_PoolIntArray>` bones **)**
|
|
|
|
Sets the bones of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_color:
|
|
|
|
- void **set_vertex_color** **(** :ref:`int<class_int>` idx, :ref:`Color<class_Color>` color **)**
|
|
|
|
Sets the color of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_meta:
|
|
|
|
- void **set_vertex_meta** **(** :ref:`int<class_int>` idx, :ref:`Variant<class_Variant>` meta **)**
|
|
|
|
Sets the metadata associated with the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_normal:
|
|
|
|
- void **set_vertex_normal** **(** :ref:`int<class_int>` idx, :ref:`Vector3<class_Vector3>` normal **)**
|
|
|
|
Sets the normal of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_tangent:
|
|
|
|
- void **set_vertex_tangent** **(** :ref:`int<class_int>` idx, :ref:`Plane<class_Plane>` tangent **)**
|
|
|
|
Sets the tangent of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_uv:
|
|
|
|
- void **set_vertex_uv** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv **)**
|
|
|
|
Sets the UV of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_uv2:
|
|
|
|
- void **set_vertex_uv2** **(** :ref:`int<class_int>` idx, :ref:`Vector2<class_Vector2>` uv2 **)**
|
|
|
|
Sets the UV2 of the given vertex.
|
|
|
|
----
|
|
|
|
.. _class_MeshDataTool_method_set_vertex_weights:
|
|
|
|
- void **set_vertex_weights** **(** :ref:`int<class_int>` idx, :ref:`PoolRealArray<class_PoolRealArray>` weights **)**
|
|
|
|
Sets the bone weights of the given vertex.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|
|
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
|