From cfd8b3cd9bb1cdcc30cfed7c679cd950cb4f5689 Mon Sep 17 00:00:00 2001 From: Mateus Elias Date: Mon, 28 Aug 2023 18:32:53 -0300 Subject: [PATCH] Improve MeshDataTool.get_face_vertex() method description Improve MeshDataTool.get_face_vertex() method description and also add an example code. Co-authored-by: Raul Santos (cherry picked from commit adb0d0ea5845cba3ced5e6a1e32c40b12cc8bc2c) --- doc/classes/MeshDataTool.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 645cfb5464a..eb33b7bf6d8 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -137,8 +137,21 @@ - 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]