mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
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 <raulsntos@gmail.com>
This commit is contained in:
parent
541674d106
commit
adb0d0ea58
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user