summaryrefslogtreecommitdiff
path: root/doc/classes/PrimitiveMesh.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/PrimitiveMesh.xml')
-rw-r--r--doc/classes/PrimitiveMesh.xml17
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml
index 9e7f26ed4f..25943f6d47 100644
--- a/doc/classes/PrimitiveMesh.xml
+++ b/doc/classes/PrimitiveMesh.xml
@@ -4,7 +4,7 @@
Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh.
</brief_description>
<description>
- Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [CapsuleMesh], [CubeMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh].
+ Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. Examples include [BoxMesh], [CapsuleMesh], [CylinderMesh], [PlaneMesh], [PrismMesh], [QuadMesh], and [SphereMesh].
</description>
<tutorials>
</tutorials>
@@ -14,11 +14,18 @@
</return>
<description>
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()
+ [codeblocks]
+ [gdscript]
+ var c = CylinderMesh.new()
+ var arr_mesh = ArrayMesh.new()
arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, c.get_mesh_arrays())
- [/codeblock]
+ [/gdscript]
+ [csharp]
+ var c = new CylinderMesh();
+ var arrMesh = new ArrayMesh();
+ arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, c.GetMeshArrays());
+ [/csharp]
+ [/codeblocks]
</description>
</method>
</methods>