Skip to content

Commit

Permalink
Merge pull request #81088 from mateuseap/docs/meshDataToolClassReference
Browse files Browse the repository at this point in the history
Improve `MeshDataTool.get_face_vertex()` method description
  • Loading branch information
akien-mga committed Aug 29, 2023
2 parents 7792f9e + adb0d0e commit c52c830
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion doc/classes/MeshDataTool.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit c52c830

Please sign in to comment.