Merge pull request #40414 from rcorre/get-mesh-arrays-doc

Clarify how to convert PrimitiveMesh to ArrayMesh.
This commit is contained in:
Rémi Verschelde 2020-07-15 15:30:27 +02:00 committed by GitHub
commit f131daf972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,12 @@
<return type="Array">
</return>
<description>
Returns mesh arrays used to constitute surface of [Mesh]. Mesh arrays can be used with [ArrayMesh] to create new surfaces.
Returns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example:
[codeblock]
var c := CylinderMesh.new()
var arr_mesh := ArrayMesh.new()
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays())
[/codeblock]
</description>
</method>
</methods>