summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-07-15 15:30:27 +0200
committerGitHub <noreply@github.com>2020-07-15 15:30:27 +0200
commitf131daf9723d140d1ace991c5acffcba6c08675b (patch)
tree03455f9312133f7b50efc10aec6ef519127e1ed4
parent1cc5d3590663990dad6009bee9aebb2d022e8a11 (diff)
parent933bf9652385c7e63418bc52f2c8e2bb2311d577 (diff)
Merge pull request #40414 from rcorre/get-mesh-arrays-doc
Clarify how to convert PrimitiveMesh to ArrayMesh.
-rw-r--r--doc/classes/PrimitiveMesh.xml7
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 77915bc538..9e7f26ed4f 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -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>