summaryrefslogtreecommitdiff
path: root/doc/classes/ArrayMesh.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/ArrayMesh.xml')
-rw-r--r--doc/classes/ArrayMesh.xml15
1 files changed, 9 insertions, 6 deletions
diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml
index 9f32691e57..20f8b2ab60 100644
--- a/doc/classes/ArrayMesh.xml
+++ b/doc/classes/ArrayMesh.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ArrayMesh" inherits="Mesh" category="Core" version="3.2">
+<class name="ArrayMesh" inherits="Mesh" version="3.2">
<brief_description>
[Mesh] type that provides utility for constructing a surface from arrays.
</brief_description>
<description>
- The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays. The most basic example is the creation of a single triangle
+ The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays.
+ The most basic example is the creation of a single triangle:
[codeblock]
var vertices = PoolVector3Array()
vertices.push_back(Vector3(0, 1, 0))
@@ -20,9 +21,10 @@
var m = MeshInstance.new()
m.mesh = arr_mesh
[/codeblock]
- The [code]MeshInstance[/code] is ready to be added to the SceneTree to be shown.
+ The [MeshInstance] is ready to be added to the [SceneTree] to be shown.
</description>
<tutorials>
+ <link>https://docs.godotengine.org/en/latest/tutorials/content/procedural_geometry/arraymesh.html</link>
</tutorials>
<methods>
<method name="add_blend_shape">
@@ -47,7 +49,7 @@
</argument>
<description>
Creates a new surface.
- Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See [Mesh] for details. (As a note, when using indices, it is recommended to only use points, lines or triangles). [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
+ Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.
The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used.
Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices.
Godot uses clockwise winding order for front faces of triangle primitive modes.
@@ -185,6 +187,7 @@
</methods>
<members>
<member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1">
+ Sets the blend shape mode to one of [enum Mesh.BlendShapeMode].
</member>
<member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )">
Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices.
@@ -232,10 +235,10 @@
Array format will include vertices (mandatory).
</constant>
<constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat">
- Array format will include normals
+ Array format will include normals.
</constant>
<constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat">
- Array format will include tangents
+ Array format will include tangents.
</constant>
<constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat">
Array format will include a color array.