Merge pull request #81088 from mateuseap/docs/meshDataToolClassReference

Improve `MeshDataTool.get_face_vertex()` method description
This commit is contained in:
Rémi Verschelde 2023-08-29 12:47:31 +02:00
commit c52c830c9f
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -137,8 +137,21 @@
<param index="0" name="idx" type="int" />
<param index="1" name="vertex" type="int" />
<description>
Returns the specified vertex of the given face.
Returns the specified vertex index of the given face.
Vertex argument must be either 0, 1, or 2 because faces contain three vertices.
[b]Example:[/b]
[codeblocks]
[gdscript]
var index = mesh_data_tool.get_face_vertex(0, 1) # Gets the index of the second vertex of the first face.
var position = mesh_data_tool.get_vertex(index)
var normal = mesh_data_tool.get_vertex_normal(index)
[/gdscript]
[csharp]
int index = meshDataTool.GetFaceVertex(0, 1); // Gets the index of the second vertex of the first face.
Vector3 position = meshDataTool.GetVertex(index);
Vector3 normal = meshDataTool.GetVertexNormal(index);
[/csharp]
[/codeblocks]
</description>
</method>
<method name="get_format" qualifiers="const">