mirror of
				https://github.com/godotengine/godot.git
				synced 2025-11-04 07:31:16 +00: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
					
				
					 1 changed files with 14 additions and 1 deletions
				
			
		| 
						 | 
					@ -137,8 +137,21 @@
 | 
				
			||||||
			<param index="0" name="idx" type="int" />
 | 
								<param index="0" name="idx" type="int" />
 | 
				
			||||||
			<param index="1" name="vertex" type="int" />
 | 
								<param index="1" name="vertex" type="int" />
 | 
				
			||||||
			<description>
 | 
								<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.
 | 
									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>
 | 
								</description>
 | 
				
			||||||
		</method>
 | 
							</method>
 | 
				
			||||||
		<method name="get_format" qualifiers="const">
 | 
							<method name="get_format" qualifiers="const">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue